[PATCH 3/3] PMFS: Don't override root inode perms on mount

Ross Zwisler ross.zwisler at linux.intel.com
Wed Jun 19 19:56:36 EDT 2013

For some reason we were manually overriding the root inode permissions
to be drwxrwxrwt on each mount.  This commit takes that code out and
leaves the permissions as they were on unmount.

I also changed an error message that was erroneously saying we were
doing something to recover when the root inode wasn't marked as being a

Signed-off-by: Ross Zwisler <ross.zwisler at linux.intel.com>
Acked-by: Rob Gittins <rob.gittins at intel.com>
 fs/pmfs/super.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/fs/pmfs/super.c b/fs/pmfs/super.c
index 6d4d6a6..6f788c9 100644
--- a/fs/pmfs/super.c
+++ b/fs/pmfs/super.c
@@ -524,7 +524,6 @@ static inline void set_default_opts(struct pmfs_sb_info *sbi)
 static void pmfs_root_check(struct super_block *sb, struct pmfs_inode *root_pi)
-	pmfs_memunlock_inode(sb, root_pi);
  *      if (root_pi->i_d.d_next) {
  *              pmfs_warn("root->next not NULL, trying to fix\n");
@@ -532,16 +531,13 @@ static void pmfs_root_check(struct super_block *sb, struct pmfs_inode *root_pi)
  *      }
 	if (!S_ISDIR(le16_to_cpu(root_pi->i_mode)))
-		pmfs_warn("root is not a directory, trying to fix\n");
+		pmfs_warn("root is not a directory!\n");
 #if 0
 	if (pmfs_calc_checksum((u8 *)root_pi, PMFS_INODE_SIZE)) {
 		pmfs_dbg("checksum error in root inode, trying to fix\n");
 		goto fail3;
-	root_pi->i_mode = cpu_to_le16(S_IRWXUGO | S_ISVTX | S_IFDIR);
-	pmfs_memlock_inode(sb, root_pi);
-	pmfs_flush_buffer(&root_pi->i_mode, sizeof(root_pi->i_mode), false);
 int pmfs_check_integrity(struct super_block *sb,

More information about the Linux-pmfs mailing list