[GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
[samba.git] / source / modules / vfs_default.c
index 08dd61609cdb31ace89fcf14e1921e74541db8e2..ca27cf0ac3af4d12567c76a065616c8741fc06fc 100644 (file)
@@ -791,10 +791,6 @@ static BOOL vfswrap_lock(vfs_handle_struct *handle, files_struct *fsp, int fd, i
        BOOL result;
 
        START_PROFILE(syscall_fcntl_lock);
-
-       /* SMB_VFS_GETLOCK should be used to query lock status. */
-       SMB_ASSERT(op != SMB_F_GETLK);
-
        result =  fcntl_lock(fd, op, offset, count, type);
        END_PROFILE(syscall_fcntl_lock);
        return result;
@@ -826,10 +822,11 @@ static int vfswrap_linux_setlease(vfs_handle_struct *handle, files_struct *fsp,
 
        START_PROFILE(syscall_linux_setlease);
 
-#ifdef LINUX
+#ifdef HAVE_KERNEL_OPLOCKS_LINUX
        /* first set the signal handler */
-       if(linux_set_lease_sighandler(fd) == -1)
+       if(linux_set_lease_sighandler(fd) == -1) {
                return -1;
+       }
 
        result = linux_setlease(fd, leasetype);
 #else
@@ -926,6 +923,11 @@ static int vfswrap_chflags(vfs_handle_struct *handle, const char *path, int flag
 #endif
 }
 
+static struct file_id vfswrap_file_id_create(struct vfs_handle_struct *handle, SMB_DEV_T dev, SMB_INO_T inode)
+{
+       return file_id_create_dev(dev, inode);
+}
+
 static size_t vfswrap_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp, int fd, uint32 security_info, SEC_DESC **ppdesc)
 {
        size_t result;
@@ -1313,6 +1315,8 @@ static vfs_op_tuple vfs_default_ops[] = {
         SMB_VFS_LAYER_OPAQUE},
        {SMB_VFS_OP(vfswrap_chflags),   SMB_VFS_OP_CHFLAGS,
         SMB_VFS_LAYER_OPAQUE},
+       {SMB_VFS_OP(vfswrap_file_id_create),    SMB_VFS_OP_FILE_ID_CREATE,
+        SMB_VFS_LAYER_OPAQUE},
 
        /* NT ACL operations. */