From 69eb66d7da7dba2696281981347698e1693c2340 Mon Sep 17 00:00:00 2001 From: Dave Kleikamp Date: Thu, 9 Mar 2006 13:59:30 -0600 Subject: 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 --- fs/jfs/jfs_inode.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'fs/jfs/jfs_inode.c') diff --git a/fs/jfs/jfs_inode.c b/fs/jfs/jfs_inode.c index ffd2a8a0078..495df402916 100644 --- a/fs/jfs/jfs_inode.c +++ b/fs/jfs/jfs_inode.c @@ -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. */ -- cgit v1.2.3