All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs: use helper function file_inode() to get inode
@ 2022-12-06  6:15 Chen Xiao
  0 siblings, 0 replies; only message in thread
From: Chen Xiao @ 2022-12-06  6:15 UTC (permalink / raw)
  To: viro; +Cc: linux-fsdevel, linux-kernel, Chen Xiao

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-06  6:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-06  6:15 [PATCH] fs: use helper function file_inode() to get inode Chen Xiao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.