aboutsummaryrefslogtreecommitdiffstats
path: root/fs/logfs/readwrite.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-04-04 22:37:28 -0400
committerTejun Heo <tj@kernel.org>2010-04-04 22:37:28 -0400
commit336f5899d287f06d8329e208fc14ce50f7ec9698 (patch)
tree9b762d450d5eb248a6ff8317badb7e223d93ed58 /fs/logfs/readwrite.c
parenta4ab2773205e8b94c18625455f85e3b6bb9d7ad6 (diff)
parentdb217dece3003df0841bacf9556b5c06aa097dae (diff)
Merge branch 'master' into export-slabh
Diffstat (limited to 'fs/logfs/readwrite.c')
-rw-r--r--fs/logfs/readwrite.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/logfs/readwrite.c b/fs/logfs/readwrite.c
index d5919af2c7a7..bff40253dfb2 100644
--- a/fs/logfs/readwrite.c
+++ b/fs/logfs/readwrite.c
@@ -1595,7 +1595,6 @@ int logfs_delete(struct inode *inode, pgoff_t index,
1595 return ret; 1595 return ret;
1596} 1596}
1597 1597
1598/* Rewrite cannot mark the inode dirty but has to write it immediatly. */
1599int logfs_rewrite_block(struct inode *inode, u64 bix, u64 ofs, 1598int logfs_rewrite_block(struct inode *inode, u64 bix, u64 ofs,
1600 gc_level_t gc_level, long flags) 1599 gc_level_t gc_level, long flags)
1601{ 1600{
@@ -1612,6 +1611,18 @@ int logfs_rewrite_block(struct inode *inode, u64 bix, u64 ofs,
1612 if (level != 0) 1611 if (level != 0)
1613 alloc_indirect_block(inode, page, 0); 1612 alloc_indirect_block(inode, page, 0);
1614 err = logfs_write_buf(inode, page, flags); 1613 err = logfs_write_buf(inode, page, flags);
1614 if (!err && shrink_level(gc_level) == 0) {
1615 /* Rewrite cannot mark the inode dirty but has to
1616 * write it immediatly.
1617 * Q: Can't we just create an alias for the inode
1618 * instead? And if not, why not?
1619 */
1620 if (inode->i_ino == LOGFS_INO_MASTER)
1621 logfs_write_anchor(inode->i_sb);
1622 else {
1623 err = __logfs_write_inode(inode, flags);
1624 }
1625 }
1615 } 1626 }
1616 logfs_put_write_page(page); 1627 logfs_put_write_page(page);
1617 return err; 1628 return err;