tmp_suning_uos_patched/fs/fuse
Miklos Szeredi 37fb3a30b4 fuse: fix flock
Commit a9ff4f87 "fuse: support BSD locking semantics" overlooked a
number of issues with supporing flock locks over existing POSIX
locking infrastructure:

  - it's not backward compatible, passing flock(2) calls to userspace
    unconditionally (if userspace sets FUSE_POSIX_LOCKS)

  - it doesn't cater for the fact that flock locks are automatically
    unlocked on file release

  - it doesn't take into account the fact that flock exclusive locks
    (write locks) don't need an fd opened for write.

The last one invalidates the original premise of the patch that flock
locks can be emulated with POSIX locks.

This patch fixes the first two issues.  The last one needs to be fixed
in userspace if the filesystem assumed that a write lock will happen
only on a file operned for write (as in the case of the current fuse
library).

Reported-by: Sebastian Pipping <webmaster@hartwork.org>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
2011-08-08 16:08:08 +02:00
..
control.c convert get_sb_single() users 2010-10-29 04:16:28 -04:00
cuse.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse 2011-03-22 10:42:43 -07:00
dev.c mm: add replace_page_cache_page() function 2011-03-22 17:44:02 -07:00
dir.c fuse: remove unnecessary dentry_unhash on rmdir, dir rename 2011-05-28 01:02:53 -04:00
file.c fuse: fix flock 2011-08-08 16:08:08 +02:00
fuse_i.h fuse: fix flock 2011-08-08 16:08:08 +02:00
inode.c fuse: fix flock 2011-08-08 16:08:08 +02:00
Kconfig fs/Kconfig: move fuse out 2009-01-22 13:15:55 +03:00
Makefile CUSE: implement CUSE - Character device in Userspace 2009-06-09 11:24:11 +02:00