130d1f956a
Currently, the fl_owner isn't set for flock locks. Some filesystems use byte-range locks to simulate flock locks and there is a common idiom in those that does: fl->fl_owner = (fl_owner_t)filp; fl->fl_start = 0; fl->fl_end = OFFSET_MAX; Since flock locks are generally "owned" by the open file description, move this into the common flock lock setup code. The fl_start and fl_end fields are already set appropriately, so remove the unneeded setting of that in flock ops in those filesystems as well. Finally, the lease code also sets the fl_owner as if they were owned by the process and not the open file description. This is incorrect as leases have the same ownership semantics as flock locks. Set them the same way. The lease code doesn't actually use the fl_owner value for anything, so this is more for consistency's sake than a bugfix. Reported-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Jeff Layton <jlayton@poochiereds.net> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (Staging portion) Acked-by: J. Bruce Fields <bfields@fieldses.org> |
||
---|---|---|
.. | ||
blocklayout | ||
objlayout | ||
cache_lib.c | ||
cache_lib.h | ||
callback_proc.c | ||
callback_xdr.c | ||
callback.c | ||
callback.h | ||
client.c | ||
delegation.c | ||
delegation.h | ||
dir.c | ||
direct.c | ||
dns_resolve.c | ||
dns_resolve.h | ||
file.c | ||
fscache-index.c | ||
fscache.c | ||
fscache.h | ||
getroot.c | ||
idmap.c | ||
inode.c | ||
internal.h | ||
iostat.h | ||
Kconfig | ||
Makefile | ||
mount_clnt.c | ||
namespace.c | ||
netns.h | ||
nfs2super.c | ||
nfs2xdr.c | ||
nfs3acl.c | ||
nfs3client.c | ||
nfs3proc.c | ||
nfs3super.c | ||
nfs3xdr.c | ||
nfs4_fs.h | ||
nfs4client.c | ||
nfs4file.c | ||
nfs4filelayout.c | ||
nfs4filelayout.h | ||
nfs4filelayoutdev.c | ||
nfs4getroot.c | ||
nfs4namespace.c | ||
nfs4proc.c | ||
nfs4renewd.c | ||
nfs4session.c | ||
nfs4session.h | ||
nfs4state.c | ||
nfs4super.c | ||
nfs4sysctl.c | ||
nfs4trace.c | ||
nfs4trace.h | ||
nfs4xdr.c | ||
nfs.h | ||
nfsroot.c | ||
nfstrace.c | ||
nfstrace.h | ||
pagelist.c | ||
pnfs_dev.c | ||
pnfs.c | ||
pnfs.h | ||
proc.c | ||
read.c | ||
super.c | ||
symlink.c | ||
sysctl.c | ||
unlink.c | ||
write.c |