diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-26 03:18:29 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-03 22:55:08 -0500 |
commit | faa17292fd3a5a80345511ea341a59ac40ab59dc (patch) | |
tree | 28ae7b2aa85f632053b2d78daf700609106e99b6 /fs/udf | |
parent | 541af6a07474352e2143a0527c2b62b732439815 (diff) |
udf: propagate umode_t
note re mount options: fmask and dmask are explicitly truncated to 12bit,
UDF_INVALID_MODE just needs to be guaranteed to differ from any such value.
And umask is used only in &= with umode_t, so we ignore other bits anyway.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/udf')
-rw-r--r-- | fs/udf/ialloc.c | 2 | ||||
-rw-r--r-- | fs/udf/inode.c | 6 | ||||
-rw-r--r-- | fs/udf/super.c | 12 | ||||
-rw-r--r-- | fs/udf/udf_sb.h | 8 | ||||
-rw-r--r-- | fs/udf/udfdecl.h | 2 |
5 files changed, 15 insertions, 15 deletions
diff --git a/fs/udf/ialloc.c b/fs/udf/ialloc.c index 6fb7e0adcda0..05ab48195be9 100644 --- a/fs/udf/ialloc.c +++ b/fs/udf/ialloc.c | |||
@@ -46,7 +46,7 @@ void udf_free_inode(struct inode *inode) | |||
46 | udf_free_blocks(sb, NULL, &UDF_I(inode)->i_location, 0, 1); | 46 | udf_free_blocks(sb, NULL, &UDF_I(inode)->i_location, 0, 1); |
47 | } | 47 | } |
48 | 48 | ||
49 | struct inode *udf_new_inode(struct inode *dir, int mode, int *err) | 49 | struct inode *udf_new_inode(struct inode *dir, umode_t mode, int *err) |
50 | { | 50 | { |
51 | struct super_block *sb = dir->i_sb; | 51 | struct super_block *sb = dir->i_sb; |
52 | struct udf_sb_info *sbi = UDF_SB(sb); | 52 | struct udf_sb_info *sbi = UDF_SB(sb); |
diff --git a/fs/udf/inode.c b/fs/udf/inode.c index 4fd1d809738c..4598904be1bb 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c | |||
@@ -48,7 +48,7 @@ MODULE_LICENSE("GPL"); | |||
48 | 48 | ||
49 | #define EXTENT_MERGE_SIZE 5 | 49 | #define EXTENT_MERGE_SIZE 5 |
50 | 50 | ||
51 | static mode_t udf_convert_permissions(struct fileEntry *); | 51 | static umode_t udf_convert_permissions(struct fileEntry *); |
52 | static int udf_update_inode(struct inode *, int); | 52 | static int udf_update_inode(struct inode *, int); |
53 | static void udf_fill_inode(struct inode *, struct buffer_head *); | 53 | static void udf_fill_inode(struct inode *, struct buffer_head *); |
54 | static int udf_sync_inode(struct inode *inode); | 54 | static int udf_sync_inode(struct inode *inode); |
@@ -1452,9 +1452,9 @@ static int udf_alloc_i_data(struct inode *inode, size_t size) | |||
1452 | return 0; | 1452 | return 0; |
1453 | } | 1453 | } |
1454 | 1454 | ||
1455 | static mode_t udf_convert_permissions(struct fileEntry *fe) | 1455 | static umode_t udf_convert_permissions(struct fileEntry *fe) |
1456 | { | 1456 | { |
1457 | mode_t mode; | 1457 | umode_t mode; |
1458 | uint32_t permissions; | 1458 | uint32_t permissions; |
1459 | uint32_t flags; | 1459 | uint32_t flags; |
1460 | 1460 | ||
diff --git a/fs/udf/super.c b/fs/udf/super.c index 7cbe669e1026..c94fc889a486 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c | |||
@@ -195,11 +195,11 @@ struct udf_options { | |||
195 | unsigned int fileset; | 195 | unsigned int fileset; |
196 | unsigned int rootdir; | 196 | unsigned int rootdir; |
197 | unsigned int flags; | 197 | unsigned int flags; |
198 | mode_t umask; | 198 | umode_t umask; |
199 | gid_t gid; | 199 | gid_t gid; |
200 | uid_t uid; | 200 | uid_t uid; |
201 | mode_t fmode; | 201 | umode_t fmode; |
202 | mode_t dmode; | 202 | umode_t dmode; |
203 | struct nls_table *nls_map; | 203 | struct nls_table *nls_map; |
204 | }; | 204 | }; |
205 | 205 | ||
@@ -279,11 +279,11 @@ static int udf_show_options(struct seq_file *seq, struct vfsmount *mnt) | |||
279 | if (UDF_QUERY_FLAG(sb, UDF_FLAG_GID_SET)) | 279 | if (UDF_QUERY_FLAG(sb, UDF_FLAG_GID_SET)) |
280 | seq_printf(seq, ",gid=%u", sbi->s_gid); | 280 | seq_printf(seq, ",gid=%u", sbi->s_gid); |
281 | if (sbi->s_umask != 0) | 281 | if (sbi->s_umask != 0) |
282 | seq_printf(seq, ",umask=%o", sbi->s_umask); | 282 | seq_printf(seq, ",umask=%ho", sbi->s_umask); |
283 | if (sbi->s_fmode != UDF_INVALID_MODE) | 283 | if (sbi->s_fmode != UDF_INVALID_MODE) |
284 | seq_printf(seq, ",mode=%o", sbi->s_fmode); | 284 | seq_printf(seq, ",mode=%ho", sbi->s_fmode); |
285 | if (sbi->s_dmode != UDF_INVALID_MODE) | 285 | if (sbi->s_dmode != UDF_INVALID_MODE) |
286 | seq_printf(seq, ",dmode=%o", sbi->s_dmode); | 286 | seq_printf(seq, ",dmode=%ho", sbi->s_dmode); |
287 | if (UDF_QUERY_FLAG(sb, UDF_FLAG_SESSION_SET)) | 287 | if (UDF_QUERY_FLAG(sb, UDF_FLAG_SESSION_SET)) |
288 | seq_printf(seq, ",session=%u", sbi->s_session); | 288 | seq_printf(seq, ",session=%u", sbi->s_session); |
289 | if (UDF_QUERY_FLAG(sb, UDF_FLAG_LASTBLOCK_SET)) | 289 | if (UDF_QUERY_FLAG(sb, UDF_FLAG_LASTBLOCK_SET)) |
diff --git a/fs/udf/udf_sb.h b/fs/udf/udf_sb.h index 5142a82e3276..42ad69ac9576 100644 --- a/fs/udf/udf_sb.h +++ b/fs/udf/udf_sb.h | |||
@@ -50,7 +50,7 @@ | |||
50 | #define UDF_SPARABLE_MAP15 0x1522U | 50 | #define UDF_SPARABLE_MAP15 0x1522U |
51 | #define UDF_METADATA_MAP25 0x2511U | 51 | #define UDF_METADATA_MAP25 0x2511U |
52 | 52 | ||
53 | #define UDF_INVALID_MODE ((mode_t)-1) | 53 | #define UDF_INVALID_MODE ((umode_t)-1) |
54 | 54 | ||
55 | #pragma pack(1) /* XXX(hch): Why? This file just defines in-core structures */ | 55 | #pragma pack(1) /* XXX(hch): Why? This file just defines in-core structures */ |
56 | 56 | ||
@@ -127,11 +127,11 @@ struct udf_sb_info { | |||
127 | struct buffer_head *s_lvid_bh; | 127 | struct buffer_head *s_lvid_bh; |
128 | 128 | ||
129 | /* Default permissions */ | 129 | /* Default permissions */ |
130 | mode_t s_umask; | 130 | umode_t s_umask; |
131 | gid_t s_gid; | 131 | gid_t s_gid; |
132 | uid_t s_uid; | 132 | uid_t s_uid; |
133 | mode_t s_fmode; | 133 | umode_t s_fmode; |
134 | mode_t s_dmode; | 134 | umode_t s_dmode; |
135 | /* Lock protecting consistency of above permission settings */ | 135 | /* Lock protecting consistency of above permission settings */ |
136 | rwlock_t s_cred_lock; | 136 | rwlock_t s_cred_lock; |
137 | 137 | ||
diff --git a/fs/udf/udfdecl.h b/fs/udf/udfdecl.h index f34e6fc0cdaa..ebe10314e512 100644 --- a/fs/udf/udfdecl.h +++ b/fs/udf/udfdecl.h | |||
@@ -215,7 +215,7 @@ extern int udf_CS0toUTF8(struct ustr *, const struct ustr *); | |||
215 | 215 | ||
216 | /* ialloc.c */ | 216 | /* ialloc.c */ |
217 | extern void udf_free_inode(struct inode *); | 217 | extern void udf_free_inode(struct inode *); |
218 | extern struct inode *udf_new_inode(struct inode *, int, int *); | 218 | extern struct inode *udf_new_inode(struct inode *, umode_t, int *); |
219 | 219 | ||
220 | /* truncate.c */ | 220 | /* truncate.c */ |
221 | extern void udf_truncate_tail_extent(struct inode *); | 221 | extern void udf_truncate_tail_extent(struct inode *); |