aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ext3_fs.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h
index b745619a9b8e..d76800f6ecf0 100644
--- a/include/linux/ext3_fs.h
+++ b/include/linux/ext3_fs.h
@@ -185,6 +185,23 @@ struct ext3_group_desc
185 EXT3_NOCOMPR_FL | EXT3_JOURNAL_DATA_FL |\ 185 EXT3_NOCOMPR_FL | EXT3_JOURNAL_DATA_FL |\
186 EXT3_NOTAIL_FL | EXT3_DIRSYNC_FL) 186 EXT3_NOTAIL_FL | EXT3_DIRSYNC_FL)
187 187
188/* Flags that are appropriate for regular files (all but dir-specific ones). */
189#define EXT3_REG_FLMASK (~(EXT3_DIRSYNC_FL | EXT3_TOPDIR_FL))
190
191/* Flags that are appropriate for non-directories/regular files. */
192#define EXT3_OTHER_FLMASK (EXT3_NODUMP_FL | EXT3_NOATIME_FL)
193
194/* Mask out flags that are inappropriate for the given type of inode. */
195static inline __u32 ext3_mask_flags(umode_t mode, __u32 flags)
196{
197 if (S_ISDIR(mode))
198 return flags;
199 else if (S_ISREG(mode))
200 return flags & EXT3_REG_FLMASK;
201 else
202 return flags & EXT3_OTHER_FLMASK;
203}
204
188/* 205/*
189 * Inode dynamic state flags 206 * Inode dynamic state flags
190 */ 207 */