Skip to content

Commit 2411450

Browse files
Miklos Szereditorvalds
Miklos Szeredi
authored andcommitted
fuse: fix flock breakage
Commit 37fb3a3 ("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 <[email protected]> Signed-off-by: Miklos Szeredi <[email protected]> Tested-by: Martin Ziegler <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 87adf1c commit 2411450

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/fuse/inode.c

+3
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,9 @@ static void process_init_reply(struct fuse_conn *fc, struct fuse_req *req)
812812
if (arg->minor >= 17) {
813813
if (!(arg->flags & FUSE_FLOCK_LOCKS))
814814
fc->no_flock = 1;
815+
} else {
816+
if (!(arg->flags & FUSE_POSIX_LOCKS))
817+
fc->no_flock = 1;
815818
}
816819
if (arg->flags & FUSE_ATOMIC_O_TRUNC)
817820
fc->atomic_o_trunc = 1;

0 commit comments

Comments
 (0)