diff options
| author | Tom Marshall <tdm.code@gmail.com> | 2017-05-18 23:50:22 +0000 |
|---|---|---|
| committer | Hashbang173 <hashbang173@gmail.com> | 2017-07-06 15:14:12 -0400 |
| commit | c5335b42839be178adad146be6b4a678d37e6d4c (patch) | |
| tree | ae459745f2399dcb8eff016ac4bf92e638a370e8 /fs | |
| parent | 6b734163fee92767c7fe12526e6ece48c279fef8 (diff) | |
Change-Id: I8d2c8bed65a01eb0928308df638a04449a5bd881
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/namei.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c index 40d9a30eaf3..bdfbb34dd13 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2029,8 +2029,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; + } } } |
