aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/file.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2009-06-17 16:23:01 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-06-17 16:23:01 -0400
commit5cd973c44a92f4abf8f7084c804089b3eaa7b4bf (patch)
tree7bea559ab6c0a2ab4885a6064147b0cae20b8293 /fs/nfs/file.c
parent3f09df70e3a33590ae5a97b8a15486d3711c7065 (diff)
NFSv4/NLM: Push file locking BKL dependencies down into the NLM layer
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r--fs/nfs/file.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index ec7e27d00bc6..52ed56762583 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -592,7 +592,6 @@ static int do_getlk(struct file *filp, int cmd, struct file_lock *fl)
592 struct inode *inode = filp->f_mapping->host; 592 struct inode *inode = filp->f_mapping->host;
593 int status = 0; 593 int status = 0;
594 594
595 lock_kernel();
596 /* Try local locking first */ 595 /* Try local locking first */
597 posix_test_lock(filp, fl); 596 posix_test_lock(filp, fl);
598 if (fl->fl_type != F_UNLCK) { 597 if (fl->fl_type != F_UNLCK) {
@@ -608,7 +607,6 @@ static int do_getlk(struct file *filp, int cmd, struct file_lock *fl)
608 607
609 status = NFS_PROTO(inode)->lock(filp, cmd, fl); 608 status = NFS_PROTO(inode)->lock(filp, cmd, fl);
610out: 609out:
611 unlock_kernel();
612 return status; 610 return status;
613out_noconflict: 611out_noconflict:
614 fl->fl_type = F_UNLCK; 612 fl->fl_type = F_UNLCK;
@@ -650,13 +648,11 @@ static int do_unlk(struct file *filp, int cmd, struct file_lock *fl)
650 * If we're signalled while cleaning up locks on process exit, we 648 * If we're signalled while cleaning up locks on process exit, we
651 * still need to complete the unlock. 649 * still need to complete the unlock.
652 */ 650 */
653 lock_kernel();
654 /* Use local locking if mounted with "-onolock" */ 651 /* Use local locking if mounted with "-onolock" */
655 if (!(NFS_SERVER(inode)->flags & NFS_MOUNT_NONLM)) 652 if (!(NFS_SERVER(inode)->flags & NFS_MOUNT_NONLM))
656 status = NFS_PROTO(inode)->lock(filp, cmd, fl); 653 status = NFS_PROTO(inode)->lock(filp, cmd, fl);
657 else 654 else
658 status = do_vfs_lock(filp, fl); 655 status = do_vfs_lock(filp, fl);
659 unlock_kernel();
660 return status; 656 return status;
661} 657}
662 658
@@ -673,13 +669,11 @@ static int do_setlk(struct file *filp, int cmd, struct file_lock *fl)
673 if (status != 0) 669 if (status != 0)
674 goto out; 670 goto out;
675 671
676 lock_kernel();
677 /* Use local locking if mounted with "-onolock" */ 672 /* Use local locking if mounted with "-onolock" */
678 if (!(NFS_SERVER(inode)->flags & NFS_MOUNT_NONLM)) 673 if (!(NFS_SERVER(inode)->flags & NFS_MOUNT_NONLM))
679 status = NFS_PROTO(inode)->lock(filp, cmd, fl); 674 status = NFS_PROTO(inode)->lock(filp, cmd, fl);
680 else 675 else
681 status = do_vfs_lock(filp, fl); 676 status = do_vfs_lock(filp, fl);
682 unlock_kernel();
683 if (status < 0) 677 if (status < 0)
684 goto out; 678 goto out;
685 /* 679 /*