aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/inode.c
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2007-07-31 03:39:40 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-31 18:39:43 -0400
commitca76d2d8031fd8216eedadee77dfe009a63e4408 (patch)
treed24d6286f4f951b114188f2c0884b19bb8ad7c97 /fs/udf/inode.c
parentf2912a1223c0917a7b4e054f18086209137891ea (diff)
UDF: fix UID and GID mount option ignorance
This patch fix weird behaviour of UDF mounting procedure. To get UID changed (for now) we have to type mount -t udf -o uid=some_user,uid=ignore /dev/device /mnt/moun_point and specifying two uid at once is strange a bit. So with the patch we are able to mount without additional 'uid=ignore' option. The same for GID option is done. This patch will not break current mount scheme (with two option). Btw this does fix (I hope) the following [BUG 6124] mount of UDF fs ignores UID and GID options http://bugzilla.kernel.org/show_bug.cgi?id=6124 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Cc: Jan Kara <jack@ucw.cz> Cc: Michael <auslands-kv@gmx.de> Cc: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/udf/inode.c')
-rw-r--r--fs/udf/inode.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 0d2c41666cd2..1652b2c665bb 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -1127,13 +1127,15 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
1127 } 1127 }
1128 1128
1129 inode->i_uid = le32_to_cpu(fe->uid); 1129 inode->i_uid = le32_to_cpu(fe->uid);
1130 if (inode->i_uid == -1 || UDF_QUERY_FLAG(inode->i_sb, 1130 if (inode->i_uid == -1 ||
1131 UDF_FLAG_UID_IGNORE)) 1131 UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_UID_IGNORE) ||
1132 UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_UID_SET))
1132 inode->i_uid = UDF_SB(inode->i_sb)->s_uid; 1133 inode->i_uid = UDF_SB(inode->i_sb)->s_uid;
1133 1134
1134 inode->i_gid = le32_to_cpu(fe->gid); 1135 inode->i_gid = le32_to_cpu(fe->gid);
1135 if (inode->i_gid == -1 || UDF_QUERY_FLAG(inode->i_sb, 1136 if (inode->i_gid == -1 ||
1136 UDF_FLAG_GID_IGNORE)) 1137 UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_GID_IGNORE) ||
1138 UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_GID_SET))
1137 inode->i_gid = UDF_SB(inode->i_sb)->s_gid; 1139 inode->i_gid = UDF_SB(inode->i_sb)->s_gid;
1138 1140
1139 inode->i_nlink = le16_to_cpu(fe->fileLinkCount); 1141 inode->i_nlink = le16_to_cpu(fe->fileLinkCount);