aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/svclock.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/lockd/svclock.c')
-rw-r--r--fs/lockd/svclock.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index d120ec39bcb0..84c4d5e04ebb 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -501,25 +501,29 @@ nlmsvc_testlock(struct svc_rqst *rqstp, struct nlm_file *file,
501 block, block->b_flags, block->b_fl); 501 block, block->b_flags, block->b_fl);
502 if (block->b_flags & B_TIMED_OUT) { 502 if (block->b_flags & B_TIMED_OUT) {
503 nlmsvc_unlink_block(block); 503 nlmsvc_unlink_block(block);
504 return nlm_lck_denied; 504 ret = nlm_lck_denied;
505 goto out;
505 } 506 }
506 if (block->b_flags & B_GOT_CALLBACK) { 507 if (block->b_flags & B_GOT_CALLBACK) {
507 if (block->b_fl != NULL 508 if (block->b_fl != NULL
508 && block->b_fl->fl_type != F_UNLCK) { 509 && block->b_fl->fl_type != F_UNLCK) {
509 lock->fl = *block->b_fl; 510 lock->fl = *block->b_fl;
510 goto conf_lock; 511 goto conf_lock;
511 } 512 } else {
512 else {
513 nlmsvc_unlink_block(block); 513 nlmsvc_unlink_block(block);
514 return nlm_granted; 514 ret = nlm_granted;
515 goto out;
515 } 516 }
516 } 517 }
517 return nlm_drop_reply; 518 ret = nlm_drop_reply;
519 goto out;
518 } 520 }
519 521
520 error = vfs_test_lock(file->f_file, &lock->fl); 522 error = vfs_test_lock(file->f_file, &lock->fl);
521 if (error == -EINPROGRESS) 523 if (error == -EINPROGRESS) {
522 return nlmsvc_defer_lock_rqst(rqstp, block); 524 ret = nlmsvc_defer_lock_rqst(rqstp, block);
525 goto out;
526 }
523 if (error) { 527 if (error) {
524 ret = nlm_lck_denied_nolocks; 528 ret = nlm_lck_denied_nolocks;
525 goto out; 529 goto out;