const struct smb_filename * */
/* Version 35 - Add uint32_t flags to struct smb_filename */
/* Version 35 - Add get/set/fget/fset dos attribute functions. */
+/* Version 35 - Add bool use_ofd_locks to struct files_struct */
#define SMB_VFS_INTERFACE_VERSION 35
bool backup_intent; /* Handle was successfully opened with backup intent
and opener has privilege to do so. */
bool aapl_copyfile_supported;
+ bool use_ofd_locks; /* Are we using open file description locks ? */
struct smb_filename *fsp_name;
uint32_t name_hash; /* Jenkins hash of full pathname. */
uint64_t mid; /* Mid of the operation that created us. */
size_t count, i;
if (!lp_locking(fsp->conn->params) ||
- !lp_posix_locking(fsp->conn->params))
+ !lp_posix_locking(fsp->conn->params) ||
+ fsp->use_ofd_locks)
{
/*
- * No locking or POSIX to worry about or we want POSIX semantics
- * which will lose all locks on all fd's open on this dev/inode,
- * just close.
+ * No locking or POSIX to worry about or we are using POSIX
+ * open file description lock semantics which only removes
+ * locks on the file descriptor we're closing. Just close.
*/
return close(fsp->fh->fd);
}