From 8b2b74e5503e8a52d18cb97ff79f2f1c8dca696d Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Thu, 6 Jan 2011 01:37:44 -0500 Subject: [PATCH] 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. Reviewed-on: http://gerrit.openafs.org/2534 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 5abe706a7e237d3872db3638d947a14c935370d5) Change-Id: I8e12c9804cc81c8c88f820f55abd4ce863525c9a Reviewed-on: http://gerrit.openafs.org/3533 --- src/afs/LINUX/osi_vnodeops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index ed4354ee2..74e17896c 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -493,7 +493,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(); #ifdef AFS_LINUX24_ENV @@ -522,7 +522,7 @@ afs_linux_lock(struct file *fp, int cmd, struct file_lock *flp) flp->fl_end = flock.l_start + flock.l_len; crfree(credp); - return afs_convert_code(code); + return code; } -- 2.39.5