aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-09-13 21:50:45 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2014-09-13 22:14:16 -0400
commitf5be3e29127aec8c87f883aadadff337f8c2cfd7 (patch)
treeed5a52d9383df491c449779a6b13fd29c95a2b20 /fs
parent6f18493e541c690169c3b1479d47d95f624161cf (diff)
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/namei.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c
index a996bb48dfab..3d1dc745f9d8 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1137,7 +1137,7 @@ static bool __follow_mount_rcu(struct nameidata *nd, struct path *path,
1137 */ 1137 */
1138 *inode = path->dentry->d_inode; 1138 *inode = path->dentry->d_inode;
1139 } 1139 }
1140 return read_seqretry(&mount_lock, nd->m_seq) && 1140 return !read_seqretry(&mount_lock, nd->m_seq) &&
1141 !(path->dentry->d_flags & DCACHE_NEED_AUTOMOUNT); 1141 !(path->dentry->d_flags & DCACHE_NEED_AUTOMOUNT);
1142} 1142}
1143 1143
@@ -1174,7 +1174,7 @@ static int follow_dotdot_rcu(struct nameidata *nd)
1174 nd->path.mnt = &mounted->mnt; 1174 nd->path.mnt = &mounted->mnt;
1175 nd->path.dentry = mounted->mnt.mnt_root; 1175 nd->path.dentry = mounted->mnt.mnt_root;
1176 nd->seq = read_seqcount_begin(&nd->path.dentry->d_seq); 1176 nd->seq = read_seqcount_begin(&nd->path.dentry->d_seq);
1177 if (!read_seqretry(&mount_lock, nd->m_seq)) 1177 if (read_seqretry(&mount_lock, nd->m_seq))
1178 goto failed; 1178 goto failed;
1179 } 1179 }
1180 nd->inode = nd->path.dentry->d_inode; 1180 nd->inode = nd->path.dentry->d_inode;