aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-22 13:52:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-22 13:52:01 -0400
commit79f14b7c56d3b3ba58f8b43d1f70b9b71477a800 (patch)
tree3bb53b7806c1baba6cc24b91724a9264cceccd39 /fs/nfs
parentc37927d4359e81b85de644f8fb08878717cf5f3f (diff)
parent6d7bccc2215c37205ede6c9cf84db64e7c4f9443 (diff)
Merge branch 'vfs' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl
* 'vfs' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl: (30 commits) BKL: remove BKL from freevxfs BKL: remove BKL from qnx4 autofs4: Only declare function when CONFIG_COMPAT is defined autofs: Only declare function when CONFIG_COMPAT is defined ncpfs: Lock socket in ncpfs while setting its callbacks fs/locks.c: prepare for BKL removal BKL: Remove BKL from ncpfs BKL: Remove BKL from OCFS2 BKL: Remove BKL from squashfs BKL: Remove BKL from jffs2 BKL: Remove BKL from ecryptfs BKL: Remove BKL from afs BKL: Remove BKL from USB gadgetfs BKL: Remove BKL from autofs4 BKL: Remove BKL from isofs BKL: Remove BKL from fat BKL: Remove BKL from ext2 filesystem BKL: Remove BKL from do_new_mount() BKL: Remove BKL from cgroup BKL: Remove BKL from NTFS ...
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/delegation.c10
-rw-r--r--fs/nfs/nfs4state.c10
2 files changed, 10 insertions, 10 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index b9c3c43cea1d..232a7eead33a 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -71,20 +71,20 @@ static int nfs_delegation_claim_locks(struct nfs_open_context *ctx, struct nfs4_
71 if (inode->i_flock == NULL) 71 if (inode->i_flock == NULL)
72 goto out; 72 goto out;
73 73
74 /* Protect inode->i_flock using the BKL */ 74 /* Protect inode->i_flock using the file locks lock */
75 lock_kernel(); 75 lock_flocks();
76 for (fl = inode->i_flock; fl != NULL; fl = fl->fl_next) { 76 for (fl = inode->i_flock; fl != NULL; fl = fl->fl_next) {
77 if (!(fl->fl_flags & (FL_POSIX|FL_FLOCK))) 77 if (!(fl->fl_flags & (FL_POSIX|FL_FLOCK)))
78 continue; 78 continue;
79 if (nfs_file_open_context(fl->fl_file) != ctx) 79 if (nfs_file_open_context(fl->fl_file) != ctx)
80 continue; 80 continue;
81 unlock_kernel(); 81 unlock_flocks();
82 status = nfs4_lock_delegation_recall(state, fl); 82 status = nfs4_lock_delegation_recall(state, fl);
83 if (status < 0) 83 if (status < 0)
84 goto out; 84 goto out;
85 lock_kernel(); 85 lock_flocks();
86 } 86 }
87 unlock_kernel(); 87 unlock_flocks();
88out: 88out:
89 return status; 89 return status;
90} 90}
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 3e2f19b04c06..96524c5dca6b 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -40,7 +40,7 @@
40 40
41#include <linux/kernel.h> 41#include <linux/kernel.h>
42#include <linux/slab.h> 42#include <linux/slab.h>
43#include <linux/smp_lock.h> 43#include <linux/fs.h>
44#include <linux/nfs_fs.h> 44#include <linux/nfs_fs.h>
45#include <linux/nfs_idmap.h> 45#include <linux/nfs_idmap.h>
46#include <linux/kthread.h> 46#include <linux/kthread.h>
@@ -970,13 +970,13 @@ static int nfs4_reclaim_locks(struct nfs4_state *state, const struct nfs4_state_
970 /* Guard against delegation returns and new lock/unlock calls */ 970 /* Guard against delegation returns and new lock/unlock calls */
971 down_write(&nfsi->rwsem); 971 down_write(&nfsi->rwsem);
972 /* Protect inode->i_flock using the BKL */ 972 /* Protect inode->i_flock using the BKL */
973 lock_kernel(); 973 lock_flocks();
974 for (fl = inode->i_flock; fl != NULL; fl = fl->fl_next) { 974 for (fl = inode->i_flock; fl != NULL; fl = fl->fl_next) {
975 if (!(fl->fl_flags & (FL_POSIX|FL_FLOCK))) 975 if (!(fl->fl_flags & (FL_POSIX|FL_FLOCK)))
976 continue; 976 continue;
977 if (nfs_file_open_context(fl->fl_file)->state != state) 977 if (nfs_file_open_context(fl->fl_file)->state != state)
978 continue; 978 continue;
979 unlock_kernel(); 979 unlock_flocks();
980 status = ops->recover_lock(state, fl); 980 status = ops->recover_lock(state, fl);
981 switch (status) { 981 switch (status) {
982 case 0: 982 case 0:
@@ -1003,9 +1003,9 @@ static int nfs4_reclaim_locks(struct nfs4_state *state, const struct nfs4_state_
1003 /* kill_proc(fl->fl_pid, SIGLOST, 1); */ 1003 /* kill_proc(fl->fl_pid, SIGLOST, 1); */
1004 status = 0; 1004 status = 0;
1005 } 1005 }
1006 lock_kernel(); 1006 lock_flocks();
1007 } 1007 }
1008 unlock_kernel(); 1008 unlock_flocks();
1009out: 1009out:
1010 up_write(&nfsi->rwsem); 1010 up_write(&nfsi->rwsem);
1011 return status; 1011 return status;