summaryrefslogtreecommitdiff
path: root/fs/udf
diff options
context:
space:
mode:
Diffstat (limited to 'fs/udf')
-rw-r--r--fs/udf/inode.c4
-rw-r--r--fs/udf/super.c8
-rw-r--r--fs/udf/udf_sb.h2
3 files changed, 8 insertions, 6 deletions
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 1456d238f8f8..e7533f785636 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -1223,10 +1223,10 @@ static void udf_fill_inode(struct inode *inode, struct buffer_head *bh)
iinfo->i_lenExtents = inode->i_size;
if (fe->icbTag.fileType != ICBTAG_FILE_TYPE_DIRECTORY &&
- sbi->s_fmode != -1)
+ sbi->s_fmode != UDF_INVALID_MODE)
inode->i_mode = sbi->s_fmode;
else if (fe->icbTag.fileType == ICBTAG_FILE_TYPE_DIRECTORY &&
- sbi->s_dmode != -1)
+ sbi->s_dmode != UDF_INVALID_MODE)
inode->i_mode = sbi->s_dmode;
else
inode->i_mode = udf_convert_permissions(fe);
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 0368bf60f42b..b9dc6adfdd2d 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -284,9 +284,9 @@ static int udf_show_options(struct seq_file *seq, struct vfsmount *mnt)
seq_printf(seq, ",gid=%u", sbi->s_gid);
if (sbi->s_umask != 0)
seq_printf(seq, ",umask=%o", sbi->s_umask);
- if (sbi->s_fmode != -1)
+ if (sbi->s_fmode != UDF_INVALID_MODE)
seq_printf(seq, ",mode=%o", sbi->s_fmode);
- if (sbi->s_dmode != -1)
+ if (sbi->s_dmode != UDF_INVALID_MODE)
seq_printf(seq, ",dmode=%o", sbi->s_dmode);
if (UDF_QUERY_FLAG(sb, UDF_FLAG_SESSION_SET))
seq_printf(seq, ",session=%u", sbi->s_session);
@@ -1892,8 +1892,8 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
uopt.uid = -1;
uopt.gid = -1;
uopt.umask = 0;
- uopt.fmode = -1;
- uopt.dmode = -1;
+ uopt.fmode = UDF_INVALID_MODE;
+ uopt.dmode = UDF_INVALID_MODE;
sbi = kzalloc(sizeof(struct udf_sb_info), GFP_KERNEL);
if (!sbi)
diff --git a/fs/udf/udf_sb.h b/fs/udf/udf_sb.h
index 5d32c609fceb..158221ecdc42 100644
--- a/fs/udf/udf_sb.h
+++ b/fs/udf/udf_sb.h
@@ -48,6 +48,8 @@
#define UDF_SPARABLE_MAP15 0x1522U
#define UDF_METADATA_MAP25 0x2511U
+#define UDF_INVALID_MODE ((mode_t)-1)
+
#pragma pack(1) /* XXX(hch): Why? This file just defines in-core structures */
struct udf_meta_data {