|
@@ -2479,7 +2479,7 @@ struct dentry *d_alloc_parallel(struct dentry *parent,
|
|
|
|
|
|
retry:
|
|
retry:
|
|
rcu_read_lock();
|
|
rcu_read_lock();
|
|
- seq = smp_load_acquire(&parent->d_inode->i_dir_seq) & ~1;
|
|
|
|
|
|
+ seq = smp_load_acquire(&parent->d_inode->i_dir_seq);
|
|
r_seq = read_seqbegin(&rename_lock);
|
|
r_seq = read_seqbegin(&rename_lock);
|
|
dentry = __d_lookup_rcu(parent, name, &d_seq);
|
|
dentry = __d_lookup_rcu(parent, name, &d_seq);
|
|
if (unlikely(dentry)) {
|
|
if (unlikely(dentry)) {
|
|
@@ -2500,6 +2500,12 @@ retry:
|
|
rcu_read_unlock();
|
|
rcu_read_unlock();
|
|
goto retry;
|
|
goto retry;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if (unlikely(seq & 1)) {
|
|
|
|
+ rcu_read_unlock();
|
|
|
|
+ goto retry;
|
|
|
|
+ }
|
|
|
|
+
|
|
hlist_bl_lock(b);
|
|
hlist_bl_lock(b);
|
|
if (unlikely(parent->d_inode->i_dir_seq != seq)) {
|
|
if (unlikely(parent->d_inode->i_dir_seq != seq)) {
|
|
hlist_bl_unlock(b);
|
|
hlist_bl_unlock(b);
|