summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_rtalloc.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2016-08-28 22:00:12 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-11-10 10:22:12 +0100
commit5ca3fb31d499b4811deeabbf7b3dc5f867f9a6aa (patch)
tree5026bd25f8bd934bb0f3a79b80d95887d7092820 /fs/xfs/xfs_rtalloc.c
parent7e7ce0810d34f90f4551247ac21c6ac61afb6b23 (diff)
f2fs crypto: avoid unneeded memory allocation in ->readdir
commit e06f86e61d7a67fe6e826010f57aa39c674f4b1b upstream. When decrypting dirents in ->readdir, fscrypt_fname_disk_to_usr won't change content of original encrypted dirent, we don't need to allocate additional buffer for storing mirror of it, so get rid of it. [This backport fixes a regression in 4.4-stable caused by commit 11a6e8f89521 ("f2fs: check memory boundary by insane namelen"), which depended on this missing commit. This bad backport broke f2fs encryption because it moved the incrementing of 'bit_pos' to earlier in f2fs_fill_dentries() without accounting for it being used in the encrypted dir case. This caused readdir() on encrypted directories to start failing. Tested with 'kvm-xfstests -c f2fs -g encrypt'.] Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
0 files changed, 0 insertions, 0 deletions