From 703e3e9a9cb1221e59a088745482c02f863d7999 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 3 Aug 2022 21:27:11 -0400 Subject: exfat_iterate(): don't open-code file_inode(file) and it's file, not filp... Reviewed-by: Christian Brauner (Microsoft) Signed-off-by: Al Viro --- fs/exfat/dir.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fs/exfat') diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c index a27b55ec060a..0fc08fdcba73 100644 --- a/fs/exfat/dir.c +++ b/fs/exfat/dir.c @@ -212,9 +212,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; @@ -228,7 +228,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) { -- cgit v1.2.3-58-ga151