From: Donglin Peng <dolinux.peng@gmail.com>
To: trond.myklebust@hammerspace.com, anna@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org,
Donglin Peng <dolinux.peng@gmail.com>
Subject: [PATCH] NFS: dprintk() should not print negative inode number
Date: Tue, 22 Nov 2022 05:28:15 -0800 [thread overview]
Message-ID: <20221122132815.15673-1-dolinux.peng@gmail.com> (raw)
The type of the i_ino member of the inode structure is unsigned long.
There are some occurrences where dprintk() outputs a negative inode
number.This leads to confusion and more difficult to read debugging.
Fixes: 9e6e70f8d8b6 ("NFSv4: Support NFSv4 optional attributes in the struct nfs_fattr")
Signed-off-by: Donglin Peng <dolinux.peng@gmail.com>
---
fs/nfs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 6b2cfa59a1a2..53d8704e07c5 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -2081,7 +2081,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
if (S_ISDIR(inode->i_mode))
nfs_force_lookup_revalidate(inode);
attr_changed = true;
- dprintk("NFS: change_attr change on server for file %s/%ld\n",
+ dprintk("NFS: change_attr change on server for file %s/%lu\n",
inode->i_sb->s_id,
inode->i_ino);
} else if (!have_delegation)
--
2.25.1
reply other threads:[~2022-11-22 13:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20221122132815.15673-1-dolinux.peng@gmail.com \
--to=dolinux.peng@gmail.com \
--cc=anna@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@hammerspace.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