Displaying 2 results from an estimated 2 matches for "btrfs_inode_typ".
Did you mean:
btrfs_inode_type
2008 Jun 24
1
[RFC][PATCH] btrfs orphan code
...diff -r 99b12e2db0f8 inode.c
--- a/inode.c Wed Jun 18 20:50:41 2008 -0400
+++ b/inode.c Tue Jun 24 21:04:39 2008 -0400
@@ -76,6 +76,11 @@ static unsigned char btrfs_type_by_mode[
[S_IFSOCK >> S_SHIFT] = BTRFS_FT_SOCK,
[S_IFLNK >> S_SHIFT] = BTRFS_FT_SYMLINK,
};
+
+static inline u8 btrfs_inode_type(struct inode *inode)
+{
+ return btrfs_type_by_mode[(inode->i_mode & S_IFMT) >> S_SHIFT];
+}
int btrfs_check_free_space(struct btrfs_root *root, u64 num_required,
int for_del)
@@ -599,6 +604,130 @@ zeroit:
return -EIO;
}
+/*
+ * Adds an unlinked/truncating inode to the...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...fs_orphan_del(trans, inode);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
}
nr = trans->blocks_used;
@@ -4566,7 +4566,7 @@ int btrfs_add_link(struct btrfs_trans_handle *trans,
ret = btrfs_insert_dir_item(trans, root, name, name_len,
parent_inode->i_ino, &key,
btrfs_inode_type(inode), index);
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
btrfs_i_size_write(parent_inode, parent_inode->i_size +
name_len * 2);
@@ -5089,7 +5089,7 @@ again:
ret = uncompress_inline(path, inode, page,
pg_offset,
extent_offset, item);
- BUG_ON(ret);
+...