Thread (13 messages) 13 messages, 4 authors, 2008-06-12

Re: [PATCH 6/6] ext4: tighten restrictions on inode flags

From: Duane Griffin <hidden>
Date: 2008-06-11 11:50:29
Also in: lkml

2008/6/11 Aneesh Kumar K.V [off-list ref]:
quoted
+/* Mask out flags that are inappropriate for the given type of inode. */
+static inline __le32 ext4_mask_flags(__le16 mode, __le32 flags)
+{
+     if (S_ISDIR(mode))
+             return flags;
+     else if (S_ISREG(mode))
+             return flags & ~EXT4_REG_FLMASK;
+     else
+             return flags & ~EXT4_OTHER_FLMASK;
+}
+
why are the arguments __le32 ? They should be in host order.

static inline  __u32 ext4_mask_flags(umode_t mode, __u32 flags)
Whoops, I was matching the fields in ex4_inode, but I should have been
looking at ext4_inode_info. Shouldn't sparse have complained about
that?

Thanks,
Duane.

-- 
"I never could learn to drink that blood and call it wine" - Bob Dylan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help