summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorMingming <cmm@us.ibm.com>2008-05-27 10:55:43 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:03 -0400
commite1b81e6761bd8419146d4bbe0aadd8b2d348a01c (patch)
treea21c101b1dddf5acfd26dc8cd09570acb193b25e /fs/btrfs/inode.c
parentda496f2acf61153e0d4d42ded6a53f3367939db0 (diff)
downloadop-kernel-dev-e1b81e6761bd8419146d4bbe0aadd8b2d348a01c.zip
op-kernel-dev-e1b81e6761bd8419146d4bbe0aadd8b2d348a01c.tar.gz
btrfs delete ordered inode handling fix
Use btrfs_release_file instead of a put_inode call Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 40b4a8e..1569fb8 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -857,15 +857,11 @@ static int btrfs_unlink(struct inode *dir, struct dentry *dentry)
nr = trans->blocks_used;
if (inode->i_nlink == 0) {
- int found;
/* if the inode isn't linked anywhere,
* we don't need to worry about
* data=ordered
*/
- found = btrfs_del_ordered_inode(inode);
- if (found == 1) {
- atomic_dec(&inode->i_count);
- }
+ btrfs_del_ordered_inode(inode);
}
btrfs_end_transaction(trans, root);
@@ -1271,24 +1267,6 @@ fail:
return err;
}
-void btrfs_put_inode(struct inode *inode)
-{
- int ret;
-
- if (!BTRFS_I(inode)->ordered_trans) {
- return;
- }
-
- if (mapping_tagged(inode->i_mapping, PAGECACHE_TAG_DIRTY) ||
- mapping_tagged(inode->i_mapping, PAGECACHE_TAG_WRITEBACK))
- return;
-
- ret = btrfs_del_ordered_inode(inode);
- if (ret == 1) {
- atomic_dec(&inode->i_count);
- }
-}
-
void btrfs_delete_inode(struct inode *inode)
{
struct btrfs_trans_handle *trans;
OpenPOWER on IntegriCloud