linux/fs/9p
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
..
Kconfig fs/9p: xattr: add trusted and security namespaces 2013-07-07 22:02:18 -05:00
Makefile fs/9p: xattr: add trusted and security namespaces 2013-07-07 22:02:18 -05:00
acl.c fs: make posix_acl_create more useful 2014-01-25 23:58:18 -05:00
acl.h 9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate() 2013-02-26 02:46:07 -05:00
cache.c 9p: remove unused 'p9_fid' struct pointer 2013-11-23 16:10:31 -06:00
cache.h 9p: make v9fs_cache_inode_{get,put,set}_cookie empty inlines for !9P_CACHEFS 2013-10-24 23:34:47 -04:00
fid.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-03-03 13:23:03 -08:00
fid.h 9p: v9fs_fid_add() can't fail now 2013-02-28 01:18:14 -05:00
v9fs.c 9P: introduction of a new cache=mmap model. 2014-01-10 09:20:51 -06:00
v9fs.h 9P: introduction of a new cache=mmap model. 2014-01-10 09:20:51 -06:00
v9fs_vfs.h 9P: introduction of a new cache=mmap model. 2014-01-10 09:20:51 -06:00
vfs_addr.c 9P: introduction of a new cache=mmap model. 2014-01-10 09:20:51 -06:00
vfs_dentry.c consolidate simple ->d_delete() instances 2013-11-15 22:04:17 -05:00
vfs_dir.c [readdir] convert 9p 2013-06-29 12:56:45 +04:00
vfs_file.c locks: ensure that fl_owner is always initialized properly in flock and lease codepaths 2014-06-02 08:09:29 -04:00
vfs_inode.c mm + fs: store shadow entries in page cache 2014-04-03 16:21:01 -07:00
vfs_inode_dotl.c 9P: introduction of a new cache=mmap model. 2014-01-10 09:20:51 -06:00
vfs_super.c 9P: introduction of a new cache=mmap model. 2014-01-10 09:20:51 -06:00
xattr.c 9p: fix return value in case in v9fs_fid_xattr_set() 2013-11-23 16:10:31 -06:00
xattr.h fs/9p: xattr: add trusted and security namespaces 2013-07-07 22:02:18 -05:00
xattr_security.c fs/9p: xattr: add trusted and security namespaces 2013-07-07 22:02:18 -05:00
xattr_trusted.c fs/9p: xattr: add trusted and security namespaces 2013-07-07 22:02:18 -05:00
xattr_user.c fs/9p: Add support user. xattr 2010-08-02 14:28:35 -05:00