mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
NFS: remove l_pid field from nfs_lockowner
this field is not used in any important way and probably should
have been removed by
Commit: 8003d3c4aa
("nfs4: treat lock owners as opaque values")
which removed the pid argument from nfs4_get_lock_state.
Except in unusual and uninteresting cases, two threads with the same
->tgid will have the same ->files pointer, so keeping them both
for comparison brings no benefit.
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:
parent
4d3b55d3c7
commit
b184b5c38e
5 changed files with 2 additions and 9 deletions
|
@ -703,7 +703,6 @@ static void nfs_init_lock_context(struct nfs_lock_context *l_ctx)
|
|||
{
|
||||
atomic_set(&l_ctx->count, 1);
|
||||
l_ctx->lockowner.l_owner = current->files;
|
||||
l_ctx->lockowner.l_pid = current->tgid;
|
||||
INIT_LIST_HEAD(&l_ctx->list);
|
||||
atomic_set(&l_ctx->io_count, 0);
|
||||
}
|
||||
|
@ -716,8 +715,6 @@ static struct nfs_lock_context *__nfs_find_lock_context(struct nfs_open_context
|
|||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue