tmp_suning_uos_patched/fs/fuse
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
..
control.c fuse: add __exit to fuse_ctl_cleanup 2014-04-28 14:19:21 +02:00
cuse.c Nothing major: the stricter permissions checking for sysfs broke 2014-04-06 09:38:07 -07:00
dev.c pipe: kill ->map() and ->unmap() 2014-04-01 23:19:19 -04:00
dir.c fuse: add renameat2 support 2014-04-28 16:43:44 +02:00
file.c locks: ensure that fl_owner is always initialized properly in flock and lease codepaths 2014-06-02 08:09:29 -04:00
fuse_i.h fuse: add renameat2 support 2014-04-28 16:43:44 +02:00
inode.c fuse: clear MS_I_VERSION 2014-04-28 14:19:25 +02:00
Kconfig fuse: Move CUSE Kconfig entry from fs/Kconfig into fs/fuse/Kconfig 2013-01-17 13:08:45 +01:00
Makefile CUSE: implement CUSE - Character device in Userspace 2009-06-09 11:24:11 +02:00