diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-09-14 01:50:45 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-09-14 02:14:16 (GMT) |
commit | f5be3e29127aec8c87f883aadadff337f8c2cfd7 (patch) | |
tree | ed5a52d9383df491c449779a6b13fd29c95a2b20 | |
parent | 6f18493e541c690169c3b1479d47d95f624161cf (diff) | |
download | linux-f5be3e29127aec8c87f883aadadff337f8c2cfd7.tar.xz |
fix bogus read_seqretry() checks introduced in b37199e
read_seqretry() returns true on mismatch, not on match...
Cc: stable@vger.kernel.org # 3.15+
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/namei.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1137,7 +1137,7 @@ static bool __follow_mount_rcu(struct nameidata *nd, struct path *path, */ *inode = path->dentry->d_inode; } - return read_seqretry(&mount_lock, nd->m_seq) && + return !read_seqretry(&mount_lock, nd->m_seq) && !(path->dentry->d_flags & DCACHE_NEED_AUTOMOUNT); } @@ -1174,7 +1174,7 @@ static int follow_dotdot_rcu(struct nameidata *nd) nd->path.mnt = &mounted->mnt; nd->path.dentry = mounted->mnt.mnt_root; nd->seq = read_seqcount_begin(&nd->path.dentry->d_seq); - if (!read_seqretry(&mount_lock, nd->m_seq)) + if (read_seqretry(&mount_lock, nd->m_seq)) goto failed; } nd->inode = nd->path.dentry->d_inode; |