Skip to contentSkip to conversation

ATTR_ATTR_FLAG

PATCH Herbert Poetzl 1 participant 1 message May 3, 2004 VFS

lore
Share & tools
lore
#0 lore raw

Hi Folks!

stumbled about ATTR_ATTR_FLAG, and asked myself,
shouldn't this be handled in *_setattr() too?

maybe something like this:
(of course it would need some modifications for
filesystems handling *_setattr special)

best,
Herbert

fs/attr.c +2 -0
@@ -58,6 +58,?? @@ error:
 	return retval;
 }
 
+
+int inode_setattr_flags(struct inode *inode, unsigned int flags)
+{
+	unsigned int oldflags, newflags;
@@ -84,6 +112,8 @@ int inode_setattr(struct inode * inode, 
 		if (!in_group_p(inode->i_gid) && !capable(CAP_FSETID))
 			inode->i_mode &= ~S_ISGID;
 	}
+	if (ia_valid & ATTR_ATTR_FLAG)
+		inode_setattr_flags(inode, attr->ia_attr_flags);
 	mark_inode_dirty(inode);
 out:
 	return error;