fs/afs/flock.c: posix_test_lock() returns void
PATCH 1/1 fs/afs/flock.c: posix_test_lock() returns void
posix_test_lock() returns void, so there is no need to test the return value. Checking fl->fl_type for F_UNLCK instead.
Signed-off-by Eugene Teo <[email protected]>
--- fs/afs/flock.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
fs/afs/flock.c +2 -1
@@ -456,7 +456,8 @@ static int afs_do_getlk(struct file *file, struct file_lock *fl)/* check local lock records first */ ret =0 ; -if (posix_test_lock (file, fl) ==0 ) { +posix_test_lock (file, fl); +if (fl->fl_type ==F_UNLCK ) {/* no local locks; consult the server */ ret =afs_vnode_fetch_status (vnode,NULL , key);if (ret <0 )
Signature · 1 line
1.5.2.2
David Howells
maintainerQuoted 2 lines · Eugene Teo
posix_test_lock()returns void, so there is no need to test the return value. Checkingfl->fl_typeforF_UNLCKinstead.
Yep, thanks. Andrew Morton already has a patch for this.
David