summaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/ioctl.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@tuxera.com>2010-11-23 14:38:15 +0100
committerChristoph Hellwig <hch@lst.de>2010-11-23 14:38:15 +0100
commite34947056076ca5467ee8256d2d9cbc594a79b37 (patch)
treec1b70f51c1e4bc38e0b0389224862afe26c5720f /fs/hfsplus/ioctl.c
parentb33b7921db14abcd10c30d0ccfc68e364f5ef7fe (diff)
downloadblackbird-op-linux-e34947056076ca5467ee8256d2d9cbc594a79b37.tar.gz
blackbird-op-linux-e34947056076ca5467ee8256d2d9cbc594a79b37.zip
hfsplus: optimize fsync
Avoid doing unessecary work in fsync. Do nothing unless the inode was marked dirty, and only write the various metadata inodes out if they contain any dirty state from this inode. This is archived by adding three new dirty bits to the hfsplus-specific inode which are set in the correct places. Signed-off-by: Christoph Hellwig <hch@tuxera.com>
Diffstat (limited to 'fs/hfsplus/ioctl.c')
-rw-r--r--fs/hfsplus/ioctl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/hfsplus/ioctl.c b/fs/hfsplus/ioctl.c
index 40a85a3ded6e..f5a7224f4cbb 100644
--- a/fs/hfsplus/ioctl.c
+++ b/fs/hfsplus/ioctl.c
@@ -147,9 +147,11 @@ int hfsplus_setxattr(struct dentry *dentry, const char *name,
res = -ERANGE;
} else
res = -EOPNOTSUPP;
- if (!res)
+ if (!res) {
hfs_bnode_write(fd.bnode, &entry, fd.entryoffset,
sizeof(struct hfsplus_cat_file));
+ hfsplus_mark_inode_dirty(inode, HFSPLUS_I_CAT_DIRTY);
+ }
out:
hfs_find_exit(&fd);
return res;
OpenPOWER on IntegriCloud