History

fix bogus read_seqretry() checks introduced in b37199e

read_seqretry() returns true on mismatch, not on match...

Al Viro committed 12 years ago

Commit f5be3e21 parent 6f184931 file · +2 −2Browse files

Unified · Split

fs/namei.c+2−2
@@ -1137,7 +1137,7 @@ static bool __follow_mount_rcu(struct nameidata *nd, struct path *path, · 1136 unmodified lines
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) · 30 unmodified lines
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;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t