From b932723a8cd42557aa8acb1778beb3a0b7db2d9c Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sun, 11 May 2003 02:45:33 +0000 Subject: [PATCH] Ignore locking failures caused by missing NFS locking daemon. Handle EINVAL the same way as EOVERFLOW. --- server/fd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/fd.c b/server/fd.c index 191d126bce7..3ca3b74dcf7 100644 --- a/server/fd.c +++ b/server/fd.c @@ -478,6 +478,10 @@ static int set_unix_lock( const struct fd *fd, file_pos_t start, file_pos_t end, switch(errno) { + case EIO: + case ENOLCK: + /* no locking on this fs, just ignore it */ + return 1; case EACCES: case EAGAIN: set_error( STATUS_FILE_LOCK_CONFLICT ); @@ -489,6 +493,7 @@ static int set_unix_lock( const struct fd *fd, file_pos_t start, file_pos_t end, set_error( STATUS_ACCESS_DENIED ); return 0; case EOVERFLOW: + case EINVAL: /* this can happen if off_t is 64-bit but the kernel only supports 32-bit */ /* in that case we shrink the limit and retry */ if (max_unix_offset > INT_MAX)