Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NFS: discard nfs_lockowner structure.

It now has only one field and is only used in one structure.
So replaced it in that structure by the field it contains.

Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>

authored by

NeilBrown and committed by
Trond Myklebust
d51fdb87 8d424431

+6 -10
+2 -2
fs/nfs/inode.c
··· 702 702 static void nfs_init_lock_context(struct nfs_lock_context *l_ctx) 703 703 { 704 704 atomic_set(&l_ctx->count, 1); 705 - l_ctx->lockowner.l_owner = current->files; 705 + l_ctx->lockowner = current->files; 706 706 INIT_LIST_HEAD(&l_ctx->list); 707 707 atomic_set(&l_ctx->io_count, 0); 708 708 } ··· 713 713 struct nfs_lock_context *pos = head; 714 714 715 715 do { 716 - if (pos->lockowner.l_owner != current->files) 716 + if (pos->lockowner != current->files) 717 717 continue; 718 718 atomic_inc(&pos->count); 719 719 return pos;
+1 -1
fs/nfs/nfs4state.c
··· 953 953 if (test_bit(LK_STATE_IN_USE, &state->flags) == 0) 954 954 goto out; 955 955 956 - fl_owner = l_ctx->lockowner.l_owner; 956 + fl_owner = l_ctx->lockowner; 957 957 fl_flock_owner = l_ctx->open_context->flock_owner; 958 958 959 959 spin_lock(&state->state_lock);
+1 -1
fs/nfs/pagelist.c
··· 867 867 static bool nfs_match_lock_context(const struct nfs_lock_context *l1, 868 868 const struct nfs_lock_context *l2) 869 869 { 870 - return l1->lockowner.l_owner == l2->lockowner.l_owner; 870 + return l1->lockowner == l2->lockowner; 871 871 } 872 872 873 873 /**
+1 -1
fs/nfs/write.c
··· 1151 1151 if (l_ctx && flctx && 1152 1152 !(list_empty_careful(&flctx->flc_posix) && 1153 1153 list_empty_careful(&flctx->flc_flock))) { 1154 - do_flush |= l_ctx->lockowner.l_owner != current->files; 1154 + do_flush |= l_ctx->lockowner != current->files; 1155 1155 } 1156 1156 nfs_release_request(req); 1157 1157 if (!do_flush)
+1 -5
include/linux/nfs_fs.h
··· 55 55 struct rcu_head rcu_head; 56 56 }; 57 57 58 - struct nfs_lockowner { 59 - fl_owner_t l_owner; 60 - }; 61 - 62 58 struct nfs_lock_context { 63 59 atomic_t count; 64 60 struct list_head list; 65 61 struct nfs_open_context *open_context; 66 - struct nfs_lockowner lockowner; 62 + fl_owner_t lockowner; 67 63 atomic_t io_count; 68 64 }; 69 65