Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367277
b: refs/heads/master
c: 8c86899
h: refs/heads/master
i:
  367275: cd48b80
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Mar 25, 2013
1 parent 9252bfa commit e68d45b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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: c58c844187df61ef7cc103d0abb5dd6198bcfcd6
refs/heads/master: 8c86899f62738b8a22ca3a5f060e269b92e5545a
7 changes: 4 additions & 3 deletions trunk/fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,16 +565,17 @@ static void nfs_init_lock_context(struct nfs_lock_context *l_ctx)

static struct nfs_lock_context *__nfs_find_lock_context(struct nfs_open_context *ctx)
{
struct nfs_lock_context *pos;
struct nfs_lock_context *head = &ctx->lock_context;
struct nfs_lock_context *pos = head;

list_for_each_entry(pos, &ctx->lock_context.list, list) {
do {
if (pos->lockowner.l_owner != current->files)
continue;
if (pos->lockowner.l_pid != current->tgid)
continue;
atomic_inc(&pos->count);
return pos;
}
} while ((pos = list_entry(pos->list.next, typeof(*pos), list)) != head);
return NULL;
}

Expand Down

0 comments on commit e68d45b

Please sign in to comment.