diff options
author | David S. Miller <davem@davemloft.net> | 2010-04-11 17:53:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-11 17:53:53 -0400 |
commit | 871039f02f8ec4ab2e5e9010718caa8e085786f1 (patch) | |
tree | f0d2b3127fc48c862967d68c46c2d46668137515 /fs/logfs/readwrite.c | |
parent | e4077e018b5ead3de9951fc01d8bf12eeeeeefed (diff) | |
parent | 4a1032faac94ebbf647460ae3e06fc21146eb280 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/stmmac/stmmac_main.c
drivers/net/wireless/wl12xx/wl1271_cmd.c
drivers/net/wireless/wl12xx/wl1271_main.c
drivers/net/wireless/wl12xx/wl1271_spi.c
net/core/ethtool.c
net/mac80211/scan.c
Diffstat (limited to 'fs/logfs/readwrite.c')
-rw-r--r-- | fs/logfs/readwrite.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/fs/logfs/readwrite.c b/fs/logfs/readwrite.c index 7a23b3e7c0a7..bff40253dfb2 100644 --- a/fs/logfs/readwrite.c +++ b/fs/logfs/readwrite.c | |||
@@ -18,6 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | #include "logfs.h" | 19 | #include "logfs.h" |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | static u64 adjust_bix(u64 bix, level_t level) | 23 | static u64 adjust_bix(u64 bix, level_t level) |
23 | { | 24 | { |
@@ -1594,7 +1595,6 @@ int logfs_delete(struct inode *inode, pgoff_t index, | |||
1594 | return ret; | 1595 | return ret; |
1595 | } | 1596 | } |
1596 | 1597 | ||
1597 | /* Rewrite cannot mark the inode dirty but has to write it immediatly. */ | ||
1598 | int logfs_rewrite_block(struct inode *inode, u64 bix, u64 ofs, | 1598 | int logfs_rewrite_block(struct inode *inode, u64 bix, u64 ofs, |
1599 | gc_level_t gc_level, long flags) | 1599 | gc_level_t gc_level, long flags) |
1600 | { | 1600 | { |
@@ -1611,6 +1611,18 @@ int logfs_rewrite_block(struct inode *inode, u64 bix, u64 ofs, | |||
1611 | if (level != 0) | 1611 | if (level != 0) |
1612 | alloc_indirect_block(inode, page, 0); | 1612 | alloc_indirect_block(inode, page, 0); |
1613 | 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 | } | ||
1614 | } | 1626 | } |
1615 | logfs_put_write_page(page); | 1627 | logfs_put_write_page(page); |
1616 | return err; | 1628 | return err; |