]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - security/smack/smack_lsm.c
Smack: fuse mount hang fix
[linux-2.6-omap-h63xx.git] / security / smack / smack_lsm.c
index b5c8f9237008618630d95cdf58ba945b06fe94d0..4a09293efa007329fdc56b39f2dc5dd923d45f42 100644 (file)
@@ -1880,6 +1880,18 @@ static void smack_d_instantiate(struct dentry *opt_dentry, struct inode *inode)
         */
        final = sbsp->smk_default;
 
+       /*
+        * If this is the root inode the superblock
+        * may be in the process of initialization.
+        * If that is the case use the root value out
+        * of the superblock.
+        */
+       if (opt_dentry->d_parent == opt_dentry) {
+               isp->smk_inode = sbsp->smk_root;
+               isp->smk_flags |= SMK_INODE_INSTANT;
+               goto unlockandout;
+       }
+
        /*
         * This is pretty hackish.
         * Casey says that we shouldn't have to do