summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorJosef Bacik2011-01-31 22:22:42 +0100
committerJosef Bacik2011-03-17 19:21:26 +0100
commit66b4ffd110f9b48b8d8c1319ee446b53b8d073bf (patch)
tree690b14cda46b47c0d71be15a82019c35729afa75 /fs/btrfs/ctree.h
parentBtrfs: cleanup error handling in the truncate path (diff)
downloadkernel-qcow2-linux-66b4ffd110f9b48b8d8c1319ee446b53b8d073bf.tar.gz
kernel-qcow2-linux-66b4ffd110f9b48b8d8c1319ee446b53b8d073bf.tar.xz
kernel-qcow2-linux-66b4ffd110f9b48b8d8c1319ee446b53b8d073bf.zip
Btrfs: handle errors in btrfs_orphan_cleanup
If we cannot truncate an inode for some reason we will never delete the orphan item associated with that inode, which means that we will loop forever in btrfs_orphan_cleanup. Instead of doing this just return error so we fail to mount. It sucks, but hey it's better than hanging. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 34142d5647df..841330f3d68d 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2529,7 +2529,7 @@ int btrfs_update_inode(struct btrfs_trans_handle *trans,
struct inode *inode);
int btrfs_orphan_add(struct btrfs_trans_handle *trans, struct inode *inode);
int btrfs_orphan_del(struct btrfs_trans_handle *trans, struct inode *inode);
-void btrfs_orphan_cleanup(struct btrfs_root *root);
+int btrfs_orphan_cleanup(struct btrfs_root *root);
void btrfs_orphan_pre_snapshot(struct btrfs_trans_handle *trans,
struct btrfs_pending_snapshot *pending,
u64 *bytes_to_reserve);