diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2008-11-16 14:52:19 -0500 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2009-04-02 06:29:50 -0400 |
commit | 7ac9bcd5da59dd96eb1153d3fc04c3471fa5c09d (patch) | |
tree | e9c5470783e9ec098fb7a056d89872c9e225f5c3 /fs/udf/inode.c | |
parent | 530f1a5e3e93a038a457faf716975ed19f82831d (diff) |
udf: implement mode and dmode mounting options
"dmode" allows overriding permissions of directories and
"mode" allows overriding permissions of files.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/inode.c')
-rw-r--r-- | fs/udf/inode.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/udf/inode.c b/fs/udf/inode.c index 3c98c305d37d..1456d238f8f8 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c | |||
@@ -1222,8 +1222,15 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh) | |||
1222 | inode->i_size = le64_to_cpu(fe->informationLength); | 1222 | inode->i_size = le64_to_cpu(fe->informationLength); |
1223 | iinfo->i_lenExtents = inode->i_size; | 1223 | iinfo->i_lenExtents = inode->i_size; |
1224 | 1224 | ||
1225 | inode->i_mode = udf_convert_permissions(fe); | 1225 | if (fe->icbTag.fileType != ICBTAG_FILE_TYPE_DIRECTORY && |
1226 | inode->i_mode &= ~UDF_SB(inode->i_sb)->s_umask; | 1226 | sbi->s_fmode != -1) |
1227 | inode->i_mode = sbi->s_fmode; | ||
1228 | else if (fe->icbTag.fileType == ICBTAG_FILE_TYPE_DIRECTORY && | ||
1229 | sbi->s_dmode != -1) | ||
1230 | inode->i_mode = sbi->s_dmode; | ||
1231 | else | ||
1232 | inode->i_mode = udf_convert_permissions(fe); | ||
1233 | inode->i_mode &= ~sbi->s_umask; | ||
1227 | 1234 | ||
1228 | if (iinfo->i_efe == 0) { | 1235 | if (iinfo->i_efe == 0) { |
1229 | inode->i_blocks = le64_to_cpu(fe->logicalBlocksRecorded) << | 1236 | inode->i_blocks = le64_to_cpu(fe->logicalBlocksRecorded) << |