From: Jeff Layton <jlayton@kernel.org>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>, chuck.lever@oracle.com
Cc: neilb@suse.de, okorniev@redhat.com, Dai.Ngo@oracle.com,
tom@talpey.com, linux-nfs@vger.kernel.org,
linux-kernel@vger.kernel.org,
Abaci Robot <abaci@linux.alibaba.com>,
Mike Snitzer <snitzer@kernel.org>
Subject: Re: [PATCH -next] fs/nfsd: Remove the unused variable sb
Date: Mon, 04 Nov 2024 08:17:41 -0500 [thread overview]
Message-ID: <f3623b64109a021ce6b7b732f24632f0b2782144.camel@kernel.org> (raw)
In-Reply-To: <20241104082109.49986-1-jiapeng.chong@linux.alibaba.com>
On Mon, 2024-11-04 at 16:21 +0800, Jiapeng Chong wrote:
> Variable sb is not effectively used, so delete it.
>
> fs/nfsd/nfs4state.c:7988:22: warning: variable ‘sb’ set but not used.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11648
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
> fs/nfsd/nfs4state.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index 5d47a28ef62d..45e487bf0582 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -7986,7 +7986,6 @@ nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
> struct nfsd4_blocked_lock *nbl = NULL;
> struct file_lock *file_lock = NULL;
> struct file_lock *conflock = NULL;
> - struct super_block *sb;
> __be32 status = 0;
> int lkflg;
> int err;
> @@ -8006,7 +8005,6 @@ nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
> status = fh_verify(rqstp, &cstate->current_fh, S_IFREG, 0);
> if (status != nfs_ok)
> return status;
> - sb = cstate->current_fh.fh_dentry->d_sb;
>
> if (lock->lk_is_new) {
> if (nfsd4_has_session(cstate))
I would be fine with this, but there are some patches queued for v6.13
in Chuck's tree that start making use of this variable. I suggest that
we don't take this one for now.
--
Jeff Layton <jlayton@kernel.org>
prev parent reply other threads:[~2024-11-04 13:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-04 8:21 Jiapeng Chong
2024-11-04 13:17 ` Jeff Layton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f3623b64109a021ce6b7b732f24632f0b2782144.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=abaci@linux.alibaba.com \
--cc=chuck.lever@oracle.com \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=okorniev@redhat.com \
--cc=snitzer@kernel.org \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®