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>
This commit is contained in:
parent
541af6a074
commit
faa17292fd
@ -46,7 +46,7 @@ void udf_free_inode(struct inode *inode)
|
||||
udf_free_blocks(sb, NULL, &UDF_I(inode)->i_location, 0, 1);
|
||||
}
|
||||
|
||||
struct inode *udf_new_inode(struct inode *dir, int mode, int *err)
|
||||
struct inode *udf_new_inode(struct inode *dir, umode_t mode, int *err)
|
||||
{
|
||||
struct super_block *sb = dir->i_sb;
|
||||
struct udf_sb_info *sbi = UDF_SB(sb);
|
||||
|
@ -48,7 +48,7 @@ MODULE_LICENSE("GPL");
|
||||
|
||||
#define EXTENT_MERGE_SIZE 5
|
||||
|
||||
static mode_t udf_convert_permissions(struct fileEntry *);
|
||||
static umode_t udf_convert_permissions(struct fileEntry *);
|
||||
static int udf_update_inode(struct inode *, int);
|
||||
static void udf_fill_inode(struct inode *, struct buffer_head *);
|
||||
static int udf_sync_inode(struct inode *inode);
|
||||
@ -1452,9 +1452,9 @@ static int udf_alloc_i_data(struct inode *inode, size_t size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static mode_t udf_convert_permissions(struct fileEntry *fe)
|
||||
static umode_t udf_convert_permissions(struct fileEntry *fe)
|
||||
{
|
||||
mode_t mode;
|
||||
umode_t mode;
|
||||
uint32_t permissions;
|
||||
uint32_t flags;
|
||||
|
||||
|
@ -195,11 +195,11 @@ struct udf_options {
|
||||
unsigned int fileset;
|
||||
unsigned int rootdir;
|
||||
unsigned int flags;
|
||||
mode_t umask;
|
||||
umode_t umask;
|
||||
gid_t gid;
|
||||
uid_t uid;
|
||||
mode_t fmode;
|
||||
mode_t dmode;
|
||||
umode_t fmode;
|
||||
umode_t dmode;
|
||||
struct nls_table *nls_map;
|
||||
};
|
||||
|
||||
@ -279,11 +279,11 @@ static int udf_show_options(struct seq_file *seq, struct vfsmount *mnt)
|
||||
if (UDF_QUERY_FLAG(sb, UDF_FLAG_GID_SET))
|
||||
seq_printf(seq, ",gid=%u", sbi->s_gid);
|
||||
if (sbi->s_umask != 0)
|
||||
seq_printf(seq, ",umask=%o", sbi->s_umask);
|
||||
seq_printf(seq, ",umask=%ho", sbi->s_umask);
|
||||
if (sbi->s_fmode != UDF_INVALID_MODE)
|
||||
seq_printf(seq, ",mode=%o", sbi->s_fmode);
|
||||
seq_printf(seq, ",mode=%ho", sbi->s_fmode);
|
||||
if (sbi->s_dmode != UDF_INVALID_MODE)
|
||||
seq_printf(seq, ",dmode=%o", sbi->s_dmode);
|
||||
seq_printf(seq, ",dmode=%ho", sbi->s_dmode);
|
||||
if (UDF_QUERY_FLAG(sb, UDF_FLAG_SESSION_SET))
|
||||
seq_printf(seq, ",session=%u", sbi->s_session);
|
||||
if (UDF_QUERY_FLAG(sb, UDF_FLAG_LASTBLOCK_SET))
|
||||
|
@ -50,7 +50,7 @@
|
||||
#define UDF_SPARABLE_MAP15 0x1522U
|
||||
#define UDF_METADATA_MAP25 0x2511U
|
||||
|
||||
#define UDF_INVALID_MODE ((mode_t)-1)
|
||||
#define UDF_INVALID_MODE ((umode_t)-1)
|
||||
|
||||
#pragma pack(1) /* XXX(hch): Why? This file just defines in-core structures */
|
||||
|
||||
@ -127,11 +127,11 @@ struct udf_sb_info {
|
||||
struct buffer_head *s_lvid_bh;
|
||||
|
||||
/* Default permissions */
|
||||
mode_t s_umask;
|
||||
umode_t s_umask;
|
||||
gid_t s_gid;
|
||||
uid_t s_uid;
|
||||
mode_t s_fmode;
|
||||
mode_t s_dmode;
|
||||
umode_t s_fmode;
|
||||
umode_t s_dmode;
|
||||
/* Lock protecting consistency of above permission settings */
|
||||
rwlock_t s_cred_lock;
|
||||
|
||||
|
@ -215,7 +215,7 @@ extern int udf_CS0toUTF8(struct ustr *, const struct ustr *);
|
||||
|
||||
/* ialloc.c */
|
||||
extern void udf_free_inode(struct inode *);
|
||||
extern struct inode *udf_new_inode(struct inode *, int, int *);
|
||||
extern struct inode *udf_new_inode(struct inode *, umode_t, int *);
|
||||
|
||||
/* truncate.c */
|
||||
extern void udf_truncate_tail_extent(struct inode *);
|
||||
|
Loading…
Reference in New Issue
Block a user