root dentries need RCU-delayed freeing
[muen/linux.git] / fs / dcache.c
index 0e8e5de3c48a56e24a70b0185932644ba92b93b0..d677290b0acae084149bd7d6a6a4e1bff0bd37d0 100644 (file)
@@ -1932,10 +1932,12 @@ struct dentry *d_make_root(struct inode *root_inode)
 
        if (root_inode) {
                res = d_alloc_anon(root_inode->i_sb);
-               if (res)
+               if (res) {
+                       res->d_flags |= DCACHE_RCUACCESS;
                        d_instantiate(res, root_inode);
-               else
+               } else {
                        iput(root_inode);
+               }
        }
        return res;
 }