summaryrefslogtreecommitdiffstats
path: root/drivers/staging/erofs/dir.c
AgeCommit message (Collapse)Author
2019-03-29staging: erofs: keep corrupted fs from crashing kernel in erofs_readdir()Gao Xiang
After commit 419d6efc50e9, kernel cannot be crashed in the namei path. However, corrupted nameoff can do harm in the process of readdir for scenerios without dm-verity as well. Fix it now. Fixes: 3aa8ec716e52 ("staging: erofs: add directory operations") Cc: <stable@vger.kernel.org> # 4.19+ Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26staging: erofs: switch to ->iterate_shared()Gao Xiang
After commit 6192269444eb ("introduce a parallel variant of ->iterate()"), readdir can be done without taking exclusive inode lock of course. Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26staging: erofs: no need to take page lock in readdirGao Xiang
VFS will take inode_lock for readdir, therefore no need to take page lock in readdir at all just as the majority of other generic filesystems. Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: erofs: match alignment with open parenthesesBhanusree Pola
Align code with open parantheses to improve the readability. Issue found using checkpatch.pl Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Reviewed-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-12staging: erofs: Fix spelling issueAaron Strahlberger
Changed "stoped" to "stopped". Signed-off-by: Aaron Strahlberger <aaron.strahlberger@posteo.de> Signed-off-by: Julius Wiedmann <julius.wiedmann@fau.de> Signed-off-by: Dominik Huber <domi250@gmx.de> Reviewed-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-06staging: erofs: {dir,inode,super}.c: rectify BUG_ONsGao Xiang
remove all redundant BUG_ONs, and turn the rest useful usages to DBG_BUGONs. Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-14staging: erofs: use explicit unsigned int typeThomas Weißschuh
Fix coding style issue "Prefer 'unsigned int' to bare use of 'unsigned'" detected by checkpatch.pl. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Chao Yu <yuchao0@huawei.com> Reviewed-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-27staging: erofs: add directory operationsGao Xiang
This adds functions for directory, mainly readdir. Signed-off-by: Miao Xie <miaoxie@huawei.com> Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>