Skip to content

Commit f5be3e2

Browse files
author
Al Viro
committed
fix bogus read_seqretry() checks introduced in b37199e
read_seqretry() returns true on mismatch, not on match... Cc: [email protected] # 3.15+ Signed-off-by: Al Viro <[email protected]>
1 parent 6f18493 commit f5be3e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/namei.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ static bool __follow_mount_rcu(struct nameidata *nd, struct path *path,
11371137
*/
11381138
*inode = path->dentry->d_inode;
11391139
}
1140-
return read_seqretry(&mount_lock, nd->m_seq) &&
1140+
return !read_seqretry(&mount_lock, nd->m_seq) &&
11411141
!(path->dentry->d_flags & DCACHE_NEED_AUTOMOUNT);
11421142
}
11431143

@@ -1174,7 +1174,7 @@ static int follow_dotdot_rcu(struct nameidata *nd)
11741174
nd->path.mnt = &mounted->mnt;
11751175
nd->path.dentry = mounted->mnt.mnt_root;
11761176
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))
11781178
goto failed;
11791179
}
11801180
nd->inode = nd->path.dentry->d_inode;

0 commit comments

Comments
 (0)