[PATCH] fs: use helper function file_inode() to get inode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux