fs:/dcache.c: fix negative dentry limit not complete problem
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8WPQW CVE: NA -------------------------------- Restrictions of negative dentry can avoid softlock when too many dentry in memory, but restrictions before do not always take effect. For example, removing files which has been created would not enter retain_dentry(), because the dentry of file maybe has been added to lru list of superblock, it caused that fast_dput() reutrn true in last dput(). So, add restriction logic for the file which has been added to the lru list in fast_dput(), it prevents the negative dentry exceeding the limit when deleting existing file. Factor out negative dentry limit logic into limit_negative_dentry(), make the code more clean. Fixes: 7ba5d5d0 ("fs/dcache.c: avoid softlock since too many negative dentry") Signed-off-by:Long Li <leo.lilong@huawei.com>
Loading
Please sign in to comment