From: Chen Xiao <abigwc@gmail.com>
To: viro@zeniv.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Chen Xiao <abigwc@gmail.com>
Subject: [PATCH] fs: use helper function file_inode() to get inode
Date: Tue, 6 Dec 2022 14:15:34 +0800 [thread overview]
Message-ID: <1670307334-3638-1-git-send-email-abigwc@gmail.com> (raw)
Commit 496ad9aa8ef44 ("new helper: file_inode(file)") introduced
the helper file_inode(file) but dir_emit_dot forgot to use it.
Signed-off-by: Chen Xiao <abigwc@gmail.com>
---
include/linux/fs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 59ae95d..014aef9 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -3567,7 +3567,7 @@ static inline bool dir_emit(struct dir_context *ctx,
static inline bool dir_emit_dot(struct file *file, struct dir_context *ctx)
{
return ctx->actor(ctx, ".", 1, ctx->pos,
- file->f_path.dentry->d_inode->i_ino, DT_DIR);
+ file_inode(file)->i_ino, DT_DIR);
}
static inline bool dir_emit_dotdot(struct file *file, struct dir_context *ctx)
{
--
1.8.3.1
reply other threads:[~2022-12-06 6:16 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=1670307334-3638-1-git-send-email-abigwc@gmail.com \
--to=abigwc@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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