+ return 0;
+
+ return ext3_force_commit(inode->i_sb);
+}
+
+int ext3_setattr_flags(struct inode *inode, unsigned int flags)
+{
+ unsigned int oldflags, newflags;
+ int err = 0;
+
+ oldflags = EXT3_I(inode)->i_flags;
+ newflags = oldflags &
+ ~(EXT3_IMMUTABLE_FL | EXT3_IUNLINK_FL | EXT3_BARRIER_FL);
+ if (flags & ATTR_FLAG_IMMUTABLE)
+ newflags |= EXT3_IMMUTABLE_FL;
+ if (flags & ATTR_FLAG_IUNLINK)
+ newflags |= EXT3_IUNLINK_FL;
+ if (flags & ATTR_FLAG_BARRIER)
+ newflags |= EXT3_BARRIER_FL;
+
+ if (oldflags ^ newflags) {
+ handle_t *handle;
+ struct ext3_iloc iloc;
+
+ handle = ext3_journal_start(inode, 1);
+ if (IS_ERR(handle))
+ return PTR_ERR(handle);
+ if (IS_SYNC(inode))
+ handle->h_sync = 1;
+ err = ext3_reserve_inode_write(handle, inode, &iloc);
+ if (err)
+ goto flags_err;