Merge tag 'nfs-for-4.9-1' of git://git.linux-nfs.org/projects/anna/linux-nfs
[cascardo/linux.git] / fs / nfs / file.c
index 2efbdde..9ea85ae 100644 (file)
@@ -520,7 +520,9 @@ const struct address_space_operations nfs_file_aops = {
        .invalidatepage = nfs_invalidate_page,
        .releasepage = nfs_release_page,
        .direct_IO = nfs_direct_IO,
+#ifdef CONFIG_MIGRATION
        .migratepage = nfs_migrate_page,
+#endif
        .launder_page = nfs_launder_page,
        .is_dirty_writeback = nfs_check_dirty_writeback,
        .error_remove_page = generic_error_remove_page,
@@ -685,11 +687,6 @@ out_noconflict:
        goto out;
 }
 
-static int do_vfs_lock(struct file *file, struct file_lock *fl)
-{
-       return locks_lock_file_wait(file, fl);
-}
-
 static int
 do_unlk(struct file *filp, int cmd, struct file_lock *fl, int is_local)
 {
@@ -722,7 +719,7 @@ do_unlk(struct file *filp, int cmd, struct file_lock *fl, int is_local)
        if (!is_local)
                status = NFS_PROTO(inode)->lock(filp, cmd, fl);
        else
-               status = do_vfs_lock(filp, fl);
+               status = locks_lock_file_wait(filp, fl);
        return status;
 }
 
@@ -747,7 +744,7 @@ do_setlk(struct file *filp, int cmd, struct file_lock *fl, int is_local)
        if (!is_local)
                status = NFS_PROTO(inode)->lock(filp, cmd, fl);
        else
-               status = do_vfs_lock(filp, fl);
+               status = locks_lock_file_wait(filp, fl);
        if (status < 0)
                goto out;