From 24114504c4d585ec4aae7a2b2acb81bf741f8c8a Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Mon, 12 Sep 2011 09:31:49 +0200 Subject: 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 Signed-off-by: Miklos Szeredi Tested-by: Martin Ziegler Signed-off-by: Linus Torvalds --- fs/fuse/inode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 12b502929da..add96f6ffda 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) if (arg->minor >= 17) { if (!(arg->flags & FUSE_FLOCK_LOCKS)) fc->no_flock = 1; + } else { + if (!(arg->flags & FUSE_POSIX_LOCKS)) + fc->no_flock = 1; } if (arg->flags & FUSE_ATOMIC_O_TRUNC) fc->atomic_o_trunc = 1; -- cgit v1.2.3