Unionfs ODF: Fix incorrect modes on exported unionfs inodes
authorRachita Kothiyal <rachita@dewey.fsl.cs.sunysb.edu>
Sun, 4 May 2008 20:39:55 +0000 (16:39 -0400)
committerRachita Kothiyal <rachita@dewey.fsl.cs.sunysb.edu>
Sun, 4 May 2008 20:39:55 +0000 (16:39 -0400)
Incorrect modes were assigned to inodes when composing a dentry
from a file handle in unionfs_export_iget().

Signed-off-by: Rachita Kothiyal <rachita@fsl.cs.sunysb.edu>
fs/unionfs/export.c

index 9466a10c0df7a4e121822b7d69a69b4155d7b5f8..7ba349b17c0447cb7a1099fb6f4a7759c0d70c3d 100644 (file)
@@ -265,7 +265,8 @@ static struct dentry *unionfs_export_iget(struct super_block *sb,
                return ERR_PTR(-ENOMEM);
        }
 
-       result->d_inode->i_mode = mode;
+       if (!result->d_inode->i_mode)
+               result->d_inode->i_mode = mode;
        return result;
 }