mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 01:30:55 +07:00
init: fix error check in clean_path()
init_stat() returns 0 on success, same as vfs_lstat(). When it replaced
vfs_lstat(), the '!' was dropped.
Fixes: 716308a533
("init: add an init_stat helper")
Signed-off-by: Barret Rhoden <brho@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
59126901f2
commit
7b81ce7cdc
@ -297,7 +297,7 @@ static void __init clean_path(char *path, umode_t fmode)
|
||||
{
|
||||
struct kstat st;
|
||||
|
||||
if (init_stat(path, &st, AT_SYMLINK_NOFOLLOW) &&
|
||||
if (!init_stat(path, &st, AT_SYMLINK_NOFOLLOW) &&
|
||||
(st.mode ^ fmode) & S_IFMT) {
|
||||
if (S_ISDIR(st.mode))
|
||||
init_rmdir(path);
|
||||
|
Loading…
Reference in New Issue
Block a user