diff options
-rw-r--r-- | fs/namei.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1626,8 +1626,10 @@ static int path_lookupat(int dfd, const char *name, if (!err) { struct super_block *sb = nd->inode->i_sb; if (sb->s_flags & MS_RDONLY) { - if (d_is_su(nd->path.dentry) && !su_visible()) + if (d_is_su(nd->path.dentry) && !su_visible()) { + path_put(&nd->path); err = -ENOENT; + } } } |