[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200116231714.528924990@linuxfoundation.org>
Date: Fri, 17 Jan 2020 00:17:42 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Jaegeuk Kim <jaegeuk@...nel.org>,
Chao Yu <yuchao0@...wei.com>,
Ben Hutchings <ben.hutchings@...ethink.co.uk>
Subject: [PATCH 4.19 08/84] f2fs: Move err variable to function scope in f2fs_fill_dentries()
From: Ben Hutchings <ben.hutchings@...ethink.co.uk>
This is preparation for the following backported fixes. It was done
upstream as part of commit e1293bdfa01d "f2fs: plug readahead IO in
readdir()", the rest of which does not seem suitable for stable.
Cc: Jaegeuk Kim <jaegeuk@...nel.org>
Cc: Chao Yu <yuchao0@...wei.com>
Signed-off-by: Ben Hutchings <ben.hutchings@...ethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
fs/f2fs/dir.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -785,6 +785,7 @@ int f2fs_fill_dentries(struct dir_contex
struct f2fs_dir_entry *de = NULL;
struct fscrypt_str de_name = FSTR_INIT(NULL, 0);
struct f2fs_sb_info *sbi = F2FS_I_SB(d->inode);
+ int err = 0;
bit_pos = ((unsigned long)ctx->pos % d->max);
@@ -807,7 +808,6 @@ int f2fs_fill_dentries(struct dir_contex
if (f2fs_encrypted_inode(d->inode)) {
int save_len = fstr->len;
- int err;
err = fscrypt_fname_disk_to_usr(d->inode,
(u32)de->hash_code, 0,
@@ -829,7 +829,8 @@ int f2fs_fill_dentries(struct dir_contex
bit_pos += GET_DENTRY_SLOTS(le16_to_cpu(de->name_len));
ctx->pos = start_pos + bit_pos;
}
- return 0;
+out:
+ return err;
}
static int f2fs_readdir(struct file *file, struct dir_context *ctx)
Powered by blists - more mailing lists