diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2011-09-12 03:31:49 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-09-12 14:47:10 -0400 |
commit | 24114504c4d585ec4aae7a2b2acb81bf741f8c8a (patch) | |
tree | 52b9668b53f7d12342984be55b96e5784383a4ae /fs/fuse | |
parent | 87adf1c66cacbc4acd0e696c896755a5091a9d3d (diff) |
fuse: fix flock breakage
Commit 37fb3a30b4 ("fuse: fix flock") added in 3.1-rc4 caused flock() to
fail with ENOSYS with the kernel ABI version 7.16 or earlier.
Fix by falling back to testing FUSE_POSIX_LOCKS for ABI versions 7.16
and earlier.
Reported-by: Martin Ziegler <ziegler@email.mathematik.uni-freiburg.de>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Tested-by: Martin Ziegler <ziegler@email.mathematik.uni-freiburg.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/fuse')
-rw-r--r-- | fs/fuse/inode.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 12b502929da9..add96f6ffda5 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -812,6 +812,9 @@ static void process_init_reply(struct fuse_conn *fc, struct fuse_req *req) | |||
812 | if (arg->minor >= 17) { | 812 | if (arg->minor >= 17) { |
813 | if (!(arg->flags & FUSE_FLOCK_LOCKS)) | 813 | if (!(arg->flags & FUSE_FLOCK_LOCKS)) |
814 | fc->no_flock = 1; | 814 | fc->no_flock = 1; |
815 | } else { | ||
816 | if (!(arg->flags & FUSE_POSIX_LOCKS)) | ||
817 | fc->no_flock = 1; | ||
815 | } | 818 | } |
816 | if (arg->flags & FUSE_ATOMIC_O_TRUNC) | 819 | if (arg->flags & FUSE_ATOMIC_O_TRUNC) |
817 | fc->atomic_o_trunc = 1; | 820 | fc->atomic_o_trunc = 1; |