]> err.no Git - linux-2.6/blobdiff - fs/jfs/jfs_inode.c
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6] / fs / jfs / jfs_inode.c
index ae2772cba2d130fb5b017760304217c9fd05c53c..495df402916dbf5d3ff77415aec2085e9f50daf8 100644 (file)
@@ -82,6 +82,13 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
        } else
                inode->i_gid = current->fsgid;
 
+       /*
+        * New inodes need to save sane values on disk when
+        * uid & gid mount options are used
+        */
+       jfs_inode->saved_uid = inode->i_uid;
+       jfs_inode->saved_gid = inode->i_gid;
+
        /*
         * Allocate inode to quota.
         */
@@ -101,11 +108,11 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
                jfs_inode->mode2 |= IDIRECTORY;
                jfs_inode->mode2 &= ~JFS_DIRSYNC_FL;
        }
-       else if (S_ISLNK(mode))
-               jfs_inode->mode2 &=
-                       ~(JFS_IMMUTABLE_FL|JFS_APPEND_FL);
-       else
+       else {
                jfs_inode->mode2 |= INLINEEA | ISPARSE;
+               if (S_ISLNK(mode))
+                       jfs_inode->mode2 &= ~(JFS_IMMUTABLE_FL|JFS_APPEND_FL);
+       }
        jfs_inode->mode2 |= mode;
 
        inode->i_blksize = sb->s_blocksize;