mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
fcntl write lock on readonly file error fix
apparently we return EROFS where we should return EBADF. Fix the error the client gets; the RPC is unchanged (and indeed shouldn't be changed) Change-Id: I738f1ee36f39d03bf018c0f91c7de9c8ed8cc9a9 Reviewed-on: http://gerrit.openafs.org/1895 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
5c192d15ac
commit
8b6550a090
@ -434,6 +434,8 @@ HandleFlock(register struct vcache *avc, int acom, struct vrequest *areq,
|
|||||||
(tc, code, &avc->f.fid, areq,
|
(tc, code, &avc->f.fid, areq,
|
||||||
AFS_STATS_FS_RPCIDX_SETLOCK, SHARED_LOCK,
|
AFS_STATS_FS_RPCIDX_SETLOCK, SHARED_LOCK,
|
||||||
NULL));
|
NULL));
|
||||||
|
if ((LockType == LockWrite) && (code == VREADONLY))
|
||||||
|
code = EBADF; /* per POSIX; VREADONLY == EROFS */
|
||||||
} else
|
} else
|
||||||
/* XXX - Should probably try and log this when we're
|
/* XXX - Should probably try and log this when we're
|
||||||
* XXX - running with logging enabled. But it's horrid
|
* XXX - running with logging enabled. But it's horrid
|
||||||
|
Loading…
Reference in New Issue
Block a user