wineserver: Treat ENOTSUP the same way as ENOLCK, consider locking to be non-functional on that filesystem.

Francois Gouget fgouget at free.fr
Wed Jun 18 10:53:06 CDT 2014


---

This alternative fix has been suggested by Vincent Povirk. It claims 
that locking worked and thus avoids all the, imho, buggy error handling 
in the upper levels.

Note that initially I thought this was happening on FreeBSD's ufs 
filesystem (where my ~/.wine lives) but in fact it happens on NFS (where 
the wine source is). So not all FreeBSD systems are impacted which is 
good.

So on NFS we first get EBADF for the F_WRLCK and then ENOTSUP for the 
F_RDLCK. This is why commit 473a3a47 broke things: before it we were 
claiming success for F_WRLCK attempt whereas after we're returning a 
non-ACCESSDENIED error.

See also bug 36745.

 server/fd.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/server/fd.c b/server/fd.c
index 7043d04..e3b722c 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -1167,6 +1167,7 @@ static int set_unix_lock( struct fd *fd, file_pos_t start, file_pos_t end, int t
             /* fall through */
         case EIO:
         case ENOLCK:
+        case ENOTSUP:
             /* no locking on this fs, just ignore it */
             fd->fs_locks = 0;
             return 1;
-- 
2.0.0




More information about the wine-patches mailing list