Blob Blame History Raw
From b86d6cf35e9d6e7740880fb43fc3c420ea2ff4c5 Mon Sep 17 00:00:00 2001
From: Al Viro <viro@zeniv.linux.org.uk>
Date: Wed, 3 Aug 2022 21:27:11 -0400
Subject: [PATCH 1/3] exfat_iterate(): don't open-code file_inode(file)
Git-commit: 703e3e9a9cb1221e59a088745482c02f863d7999
Patch-mainline: v6.1-rc1
References: bsc#1214000

and it's file, not filp...

Reviewed-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: David Disseldorp <ddiss@suse.de>

---
 fs/exfat/dir.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c
index cb1c0d8c1714..2851fbdbbd8e 100644
--- a/fs/exfat/dir.c
+++ b/fs/exfat/dir.c
@@ -213,9 +213,9 @@ static void exfat_free_namebuf(struct exfat_dentry_namebuf *nb)
 
 /* skip iterating emit_dots when dir is empty */
 #define ITER_POS_FILLED_DOTS    (2)
-static int exfat_iterate(struct file *filp, struct dir_context *ctx)
+static int exfat_iterate(struct file *file, struct dir_context *ctx)
 {
-	struct inode *inode = filp->f_path.dentry->d_inode;
+	struct inode *inode = file_inode(file);
 	struct super_block *sb = inode->i_sb;
 	struct inode *tmp;
 	struct exfat_dir_entry de;
@@ -229,7 +229,7 @@ static int exfat_iterate(struct file *filp, struct dir_context *ctx)
 	mutex_lock(&EXFAT_SB(sb)->s_lock);
 
 	cpos = ctx->pos;
-	if (!dir_emit_dots(filp, ctx))
+	if (!dir_emit_dots(file, ctx))
 		goto unlock;
 
 	if (ctx->pos == ITER_POS_FILLED_DOTS) {
-- 
2.35.3