nfsd: eliminate find_deleg_file_locked
authorJeff Layton <jlayton@kernel.org>
Wed, 18 Jan 2023 17:31:35 +0000 (12:31 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 20 Feb 2023 14:20:51 +0000 (09:20 -0500)
We really don't need an accessor function here.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4state.c

index 7ed7239945910daf671dcdbadf34c4461029abc6..361049894a099e6e7e4d73ec3bdc83a6e2172805 100644 (file)
@@ -686,15 +686,6 @@ static struct nfsd_file *find_any_file_locked(struct nfs4_file *f)
        return NULL;
 }
 
-static struct nfsd_file *find_deleg_file_locked(struct nfs4_file *f)
-{
-       lockdep_assert_held(&f->fi_lock);
-
-       if (f->fi_deleg_file)
-               return f->fi_deleg_file;
-       return NULL;
-}
-
 static atomic_long_t num_delegations;
 unsigned long max_delegations;
 
@@ -2703,7 +2694,7 @@ static int nfs4_show_deleg(struct seq_file *s, struct nfs4_stid *st)
        ds = delegstateid(st);
        nf = st->sc_file;
        spin_lock(&nf->fi_lock);
-       file = find_deleg_file_locked(nf);
+       file = nf->fi_deleg_file;
        if (!file)
                goto out;