diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-05 10:31:29 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-05 10:31:29 -0800 |
commit | 9576c2f2934eb5839a468ae156418ef595d5fec6 (patch) | |
tree | 1dd64350de1830f639ac8b46bd0183a9fd7febc9 /fs/nfs | |
parent | 8e483ed1342a4ea45b70f0f33ac54eff7a33d918 (diff) | |
parent | 616fb38fa7a9599293e05ae1fa9acfaf73922434 (diff) |
Merge tag 'locks-v4.4-1' of git://git.samba.org/jlayton/linux
Pull file locking updates from Jeff Layton:
"The largest series of changes is from Ben who offered up a set to add
a new helper function for setting locks based on the type set in
fl_flags. Dmitry also send in a fix for a potential race that he
found with KTSAN"
* tag 'locks-v4.4-1' of git://git.samba.org/jlayton/linux:
locks: cleanup posix_lock_inode_wait and flock_lock_inode_wait
Move locks API users to locks_lock_inode_wait()
locks: introduce locks_lock_inode_wait()
locks: Use more file_inode and fix a comment
fs: fix data races on inode->i_flctx
locks: change tracepoint for generic_add_lease
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/file.c | 13 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 13 |
2 files changed, 2 insertions, 24 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index c0f9b1ed12b9..37f639d50af5 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -738,18 +738,7 @@ out_noconflict: static int do_vfs_lock(struct file *file, struct file_lock *fl) { - int res = 0; - switch (fl->fl_flags & (FL_POSIX|FL_FLOCK)) { - case FL_POSIX: - res = posix_lock_file_wait(file, fl); - break; - case FL_FLOCK: - res = flock_lock_file_wait(file, fl); - break; - default: - BUG(); - } - return res; + return locks_lock_file_wait(file, fl); } static int diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 5133bb18830e..0e5ff69455c7 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -5513,18 +5513,7 @@ static int nfs4_proc_getlk(struct nfs4_state *state, int cmd, struct file_lock * static int do_vfs_lock(struct inode *inode, struct file_lock *fl) { - int res = 0; - switch (fl->fl_flags & (FL_POSIX|FL_FLOCK)) { - case FL_POSIX: - res = posix_lock_inode_wait(inode, fl); - break; - case FL_FLOCK: - res = flock_lock_inode_wait(inode, fl); - break; - default: - BUG(); - } - return res; + return locks_lock_inode_wait(inode, fl); } struct nfs4_unlockdata { |