mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
LINUX: Use correct type of error in flock code
The flock code gets a kernel error code from afs_posix_lock_file() but then passes this error code through afs_convert_code (which sees that it is already negative, and returns EIO). Instead, we should just return afs_posix_lock_file()'s code direct to our caller. Change-Id: I28bbc2dc8535d28a4e9e9f564392fd4cbfa76569 Reviewed-on: http://gerrit.openafs.org/2534 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
bc6fe06ae5
commit
5abe706a7e
@ -480,7 +480,7 @@ afs_linux_lock(struct file *fp, int cmd, struct file_lock *flp)
|
||||
#endif /* F_GETLK64 && F_GETLK != F_GETLK64 */
|
||||
|
||||
AFS_GLOCK();
|
||||
code = afs_lockctl(vcp, &flock, cmd, credp);
|
||||
code = afs_convert_code(afs_lockctl(vcp, &flock, cmd, credp));
|
||||
AFS_GUNLOCK();
|
||||
|
||||
if ((code == 0 || flp->fl_type == F_UNLCK) &&
|
||||
@ -517,7 +517,7 @@ afs_linux_lock(struct file *fp, int cmd, struct file_lock *flp)
|
||||
flp->fl_end = flock.l_start + flock.l_len - 1;
|
||||
|
||||
crfree(credp);
|
||||
return afs_convert_code(code);
|
||||
return code;
|
||||
}
|
||||
|
||||
#ifdef STRUCT_FILE_OPERATIONS_HAS_FLOCK
|
||||
|
Loading…
Reference in New Issue
Block a user