Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23891
b: refs/heads/master
c: 5de0e50
h: refs/heads/master
i:
  23889: 911f807
  23887: f1a33db
v: v3
  • Loading branch information
Andy Adamson authored and Trond Myklebust committed Mar 20, 2006
1 parent 4bf3e05 commit 1210005
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 15dadef9460ad8d3b1d5ede1c1697dc79af44a72
refs/heads/master: 5de0e5024a4e21251fd80dbfdb83316ce97086bc
17 changes: 6 additions & 11 deletions trunk/fs/lockd/svclock.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,6 @@ nlmsvc_grant_blocked(struct nlm_block *block)
{
struct nlm_file *file = block->b_file;
struct nlm_lock *lock = &block->b_call.a_args.lock;
struct file_lock *conflock;
int error;

dprintk("lockd: grant blocked lock %p\n", block);
Expand All @@ -539,19 +538,15 @@ nlmsvc_grant_blocked(struct nlm_block *block)
}

/* Try the lock operation again */
if ((conflock = posix_test_lock(file->f_file, &lock->fl)) != NULL) {
/* Bummer, we blocked again */
error = posix_lock_file(file->f_file, &lock->fl);
switch (error) {
case 0:
break;
case -EAGAIN:
dprintk("lockd: lock still blocked\n");
nlmsvc_insert_block(block, NLM_NEVER);
posix_block_lock(conflock, &lock->fl);
goto out_unlock;
}

/* Alright, no conflicting lock. Now lock it for real. If the
* following yields an error, this is most probably due to low
* memory. Retry the lock in a few seconds.
*/
if ((error = posix_lock_file(file->f_file, &lock->fl)) < 0) {
default:
printk(KERN_WARNING "lockd: unexpected error %d in %s!\n",
-error, __FUNCTION__);
nlmsvc_insert_block(block, 10 * HZ);
Expand Down

0 comments on commit 1210005

Please sign in to comment.