Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
[powerpc.git] / fs / nfs / getroot.c
index 977e590..8391bd7 100644 (file)
@@ -9,7 +9,6 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/init.h>
 
@@ -32,7 +31,8 @@
 #include <linux/nfs_idmap.h>
 #include <linux/vfs.h>
 #include <linux/namei.h>
-#include <linux/namespace.h>
+#include <linux/mnt_namespace.h>
+#include <linux/security.h>
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -109,6 +109,8 @@ struct dentry *nfs_get_root(struct super_block *sb, struct nfs_fh *mntfh)
                return ERR_PTR(-ENOMEM);
        }
 
+       security_d_instantiate(mntroot, inode);
+
        if (!mntroot->d_op)
                mntroot->d_op = server->nfs_client->rpc_ops->dentry_ops;
 
@@ -296,6 +298,8 @@ struct dentry *nfs4_get_root(struct super_block *sb, struct nfs_fh *mntfh)
                return ERR_PTR(-ENOMEM);
        }
 
+       security_d_instantiate(mntroot, inode);
+
        if (!mntroot->d_op)
                mntroot->d_op = server->nfs_client->rpc_ops->dentry_ops;