]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
NFSD: Minor cleanup in layoutcommit processing
authorSergey Bashirov <sergeybashirov@gmail.com>
Mon, 20 Oct 2025 12:53:02 +0000 (08:53 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Oct 2025 14:20:40 +0000 (16:20 +0200)
[ Upstream commit 274365a51d88658fb51cca637ba579034e90a799 ]

Remove dprintk in nfsd4_layoutcommit. These are not needed
in day to day usage, and the information is also available
in Wireshark when capturing NFS traffic.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sergey Bashirov <sergeybashirov@gmail.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Stable-dep-of: d68886bae76a ("NFSD: Fix last write offset handling in layoutcommit")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfs4proc.c

index 8f2dc7eb4fc4510f43e4621e5a96ebdabf61e5ee..c01183ddc93f277f920f829ab35f5b8394143df1 100644 (file)
@@ -2379,18 +2379,12 @@ nfsd4_layoutcommit(struct svc_rqst *rqstp,
        inode = d_inode(current_fh->fh_dentry);
 
        nfserr = nfserr_inval;
-       if (new_size <= seg->offset) {
-               dprintk("pnfsd: last write before layout segment\n");
+       if (new_size <= seg->offset)
                goto out;
-       }
-       if (new_size > seg->offset + seg->length) {
-               dprintk("pnfsd: last write beyond layout segment\n");
+       if (new_size > seg->offset + seg->length)
                goto out;
-       }
-       if (!lcp->lc_newoffset && new_size > i_size_read(inode)) {
-               dprintk("pnfsd: layoutcommit beyond EOF\n");
+       if (!lcp->lc_newoffset && new_size > i_size_read(inode))
                goto out;
-       }
 
        nfserr = nfsd4_preprocess_layout_stateid(rqstp, cstate, &lcp->lc_sid,
                                                false, lcp->lc_layout_type,