linux/fs/nfs
Jeff Layton 130d1f956a locks: ensure that fl_owner is always initialized properly in flock and lease codepaths
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>
2014-06-02 08:09:29 -04:00
..
blocklayout mm: filemap: move radix tree hole searching here 2014-04-03 16:21:00 -07:00
objlayout
cache_lib.c
cache_lib.h
callback_proc.c NFSv4.1: Minor optimisation in get_layout_by_fh_locked() 2014-02-19 21:21:06 -05:00
callback_xdr.c
callback.c
callback.h
client.c
delegation.c NFS: Fix a delegation callback race 2014-03-02 22:03:12 -05:00
delegation.h
dir.c NFS client updates for Linux 3.15 2014-04-06 10:09:38 -07:00
direct.c nfs: page cache invalidation for dio 2014-01-13 17:29:50 -05:00
dns_resolve.c
dns_resolve.h
file.c locks: ensure that fl_owner is always initialized properly in flock and lease codepaths 2014-06-02 08:09:29 -04:00
fscache-index.c
fscache.c
fscache.h
getroot.c
idmap.c
inode.c NFS client updates for Linux 3.15 2014-04-06 10:09:38 -07:00
internal.h Merge branch 'devel' into linux-next 2014-03-17 15:15:21 -04:00
iostat.h
Kconfig
Makefile
mount_clnt.c
namespace.c
netns.h
nfs2super.c
nfs2xdr.c
nfs3acl.c NFSv3: Fix return value of nfs3_proc_setacls 2014-02-03 13:14:23 -05:00
nfs3client.c
nfs3proc.c NFS client updates for Linux 3.15 2014-04-06 10:09:38 -07:00
nfs3super.c nfs: use generic posix ACL infrastructure for v3 Posix ACLs 2014-01-26 08:26:20 -05:00
nfs3xdr.c
nfs4_fs.h NFSv4: Clear the open state flags if the new stateid does not match 2014-02-19 21:21:07 -05:00
nfs4client.c NFSv4: Schedule recovery if nfs40_walk_client_list() is interrupted 2014-03-19 08:34:20 -04:00
nfs4file.c
nfs4filelayout.c NFSv4.1 Fail data server I/O if stateid represents a lost lock 2014-03-05 11:55:24 -05:00
nfs4filelayout.h
nfs4filelayoutdev.c
nfs4getroot.c
nfs4namespace.c NFSv4: Use the correct net namespace in nfs4_update_server 2014-02-17 14:15:46 -05:00
nfs4proc.c NFSv4: Fix a use-after-free problem in open() 2014-03-28 20:12:10 -04:00
nfs4renewd.c
nfs4session.c NFSv4.1: nfs4_destroy_session must call rpc_destroy_waitqueue 2014-02-01 15:13:39 -05:00
nfs4session.h NFSv4.1: nfs4_destroy_session must call rpc_destroy_waitqueue 2014-02-01 15:13:39 -05:00
nfs4state.c NFSv4: Ensure we respect soft mount timeouts during trunking discovery 2014-03-19 08:34:40 -04:00
nfs4super.c mm + fs: store shadow entries in page cache 2014-04-03 16:21:01 -07:00
nfs4sysctl.c
nfs4trace.c
nfs4trace.h
nfs4xdr.c NFS: Clean up: revert increase in READDIR RPC buffer max size 2014-03-17 15:30:38 -04:00
nfs.h
nfsroot.c
nfstrace.c
nfstrace.h NFS: fix the handling of NFS_INO_INVALID_DATA flag in nfs_revalidate_mapping 2014-01-27 15:35:56 -05:00
pagelist.c
pnfs_dev.c
pnfs.c NFSv4.1: Ensure that we free existing layout segments if we get a new layout 2014-02-19 21:21:06 -05:00
pnfs.h
proc.c nfs: remove synchronous rename code 2014-03-17 15:14:17 -04:00
read.c
super.c fs: push sync_filesystem() down to the file system's remount_fs() 2014-03-13 10:14:33 -04:00
symlink.c
sysctl.c
unlink.c nfs: emit a fsnotify_nameremove call in sillyrename codepath 2014-03-17 15:14:17 -04:00
write.c nfs: add memory barriers around NFS_INO_INVALID_DATA and NFS_INO_INVALIDATING 2014-01-28 14:48:18 -05:00