summaryrefslogtreecommitdiff
path: root/fs/jfs/jfs_inode.c
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@austin.ibm.com>2006-03-09 22:59:30 +0300
committerDave Kleikamp <shaggy@austin.ibm.com>2006-03-09 22:59:30 +0300
commit69eb66d7da7dba2696281981347698e1693c2340 (patch)
treeba699dc7a1a80efe159f4a4401b174a7e80779fc /fs/jfs/jfs_inode.c
parentbe0bf7da19135a7a0f8c275f20c819940be218d9 (diff)
downloadlinux-69eb66d7da7dba2696281981347698e1693c2340.tar.xz
JFS: add uid, gid, and umask mount options
OS/2 doesn't initialize the uid, gid, or unix-style permission bits. The uid, gid, & umask mount options perform pretty much like those for the fat file system, overriding what is stored on disk. This is useful for users sharing the file system with OS/2. I implemented a little feature so that if you mask the execute bit, it will be re-enabled on directories when the appropriate read bit is unmasked. I didn't want to implement an fmask & dmask option. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Diffstat (limited to 'fs/jfs/jfs_inode.c')
-rw-r--r--fs/jfs/jfs_inode.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/jfs/jfs_inode.c b/fs/jfs/jfs_inode.c
index ffd2a8a00787..495df402916d 100644
--- a/fs/jfs/jfs_inode.c
+++ b/fs/jfs/jfs_inode.c
@@ -83,6 +83,13 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
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.
*/
if (DQUOT_ALLOC_INODE(inode)) {