fix fuse (closes: #1847)
[openwrt/svn-archive/archive.git] / package / fuse / patches / 210-posix_test_lock.patch
1 --- fuse.old/kernel/file.c 2007-01-28 21:25:02.000000000 +0000
2 +++ fuse.dev/kernel/file.c 2007-05-29 00:10:29.000000000 +0100
3 @@ -781,6 +785,10 @@
4
5 if (cmd == F_GETLK) {
6 if (fc->no_lock) {
7 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
8 + if (!posix_test_lock(file, fl))
9 + fl->fl_type = F_UNLCK;
10 +#else
11 #ifdef KERNEL_2_6_17_PLUS
12 if (!posix_test_lock(file, fl, fl))
13 fl->fl_type = F_UNLCK;
14 @@ -791,6 +799,7 @@
15 else
16 *fl = *cfl;
17 #endif
18 +#endif
19 err = 0;
20 } else
21 err = fuse_getlk(file, fl);