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
This commit is contained in:
@@ -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
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user