diff options
Diffstat (limited to 'fs/reiserfs/inode.c')
-rw-r--r-- | fs/reiserfs/inode.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 9c69bcacad22..f3d1c4a77979 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -207,7 +207,7 @@ static int file_capable(struct inode *inode, long block) | |||
207 | } | 207 | } |
208 | 208 | ||
209 | /*static*/ int restart_transaction(struct reiserfs_transaction_handle *th, | 209 | /*static*/ int restart_transaction(struct reiserfs_transaction_handle *th, |
210 | struct inode *inode, struct path *path) | 210 | struct inode *inode, struct treepath *path) |
211 | { | 211 | { |
212 | struct super_block *s = th->t_super; | 212 | struct super_block *s = th->t_super; |
213 | int len = th->t_blocks_allocated; | 213 | int len = th->t_blocks_allocated; |
@@ -216,11 +216,12 @@ static int file_capable(struct inode *inode, long block) | |||
216 | BUG_ON(!th->t_trans_id); | 216 | BUG_ON(!th->t_trans_id); |
217 | BUG_ON(!th->t_refcount); | 217 | BUG_ON(!th->t_refcount); |
218 | 218 | ||
219 | pathrelse(path); | ||
220 | |||
219 | /* we cannot restart while nested */ | 221 | /* we cannot restart while nested */ |
220 | if (th->t_refcount > 1) { | 222 | if (th->t_refcount > 1) { |
221 | return 0; | 223 | return 0; |
222 | } | 224 | } |
223 | pathrelse(path); | ||
224 | reiserfs_update_sd(th, inode); | 225 | reiserfs_update_sd(th, inode); |
225 | err = journal_end(th, s, len); | 226 | err = journal_end(th, s, len); |
226 | if (!err) { | 227 | if (!err) { |
@@ -569,7 +570,7 @@ static inline int _allocate_block(struct reiserfs_transaction_handle *th, | |||
569 | long block, | 570 | long block, |
570 | struct inode *inode, | 571 | struct inode *inode, |
571 | b_blocknr_t * allocated_block_nr, | 572 | b_blocknr_t * allocated_block_nr, |
572 | struct path *path, int flags) | 573 | struct treepath *path, int flags) |
573 | { | 574 | { |
574 | BUG_ON(!th->t_trans_id); | 575 | BUG_ON(!th->t_trans_id); |
575 | 576 | ||
@@ -928,15 +929,12 @@ int reiserfs_get_block(struct inode *inode, sector_t block, | |||
928 | if (blocks_needed == 1) { | 929 | if (blocks_needed == 1) { |
929 | un = &unf_single; | 930 | un = &unf_single; |
930 | } else { | 931 | } else { |
931 | un = kmalloc(min(blocks_needed, max_to_insert) * UNFM_P_SIZE, GFP_ATOMIC); // We need to avoid scheduling. | 932 | un = kzalloc(min(blocks_needed, max_to_insert) * UNFM_P_SIZE, GFP_ATOMIC); // We need to avoid scheduling. |
932 | if (!un) { | 933 | if (!un) { |
933 | un = &unf_single; | 934 | un = &unf_single; |
934 | blocks_needed = 1; | 935 | blocks_needed = 1; |
935 | max_to_insert = 0; | 936 | max_to_insert = 0; |
936 | } else | 937 | } |
937 | memset(un, 0, | ||
938 | UNFM_P_SIZE * min(blocks_needed, | ||
939 | max_to_insert)); | ||
940 | } | 938 | } |
941 | if (blocks_needed <= max_to_insert) { | 939 | if (blocks_needed <= max_to_insert) { |
942 | /* we are going to add target block to the file. Use allocated | 940 | /* we are going to add target block to the file. Use allocated |
@@ -1109,7 +1107,7 @@ static inline ulong to_fake_used_blocks(struct inode *inode, int sd_size) | |||
1109 | // | 1107 | // |
1110 | 1108 | ||
1111 | // called by read_locked_inode | 1109 | // called by read_locked_inode |
1112 | static void init_inode(struct inode *inode, struct path *path) | 1110 | static void init_inode(struct inode *inode, struct treepath *path) |
1113 | { | 1111 | { |
1114 | struct buffer_head *bh; | 1112 | struct buffer_head *bh; |
1115 | struct item_head *ih; | 1113 | struct item_head *ih; |
@@ -1286,7 +1284,7 @@ static void inode2sd_v1(void *sd, struct inode *inode, loff_t size) | |||
1286 | /* NOTE, you must prepare the buffer head before sending it here, | 1284 | /* NOTE, you must prepare the buffer head before sending it here, |
1287 | ** and then log it after the call | 1285 | ** and then log it after the call |
1288 | */ | 1286 | */ |
1289 | static void update_stat_data(struct path *path, struct inode *inode, | 1287 | static void update_stat_data(struct treepath *path, struct inode *inode, |
1290 | loff_t size) | 1288 | loff_t size) |
1291 | { | 1289 | { |
1292 | struct buffer_head *bh; | 1290 | struct buffer_head *bh; |
@@ -1655,7 +1653,7 @@ int reiserfs_write_inode(struct inode *inode, int do_sync) | |||
1655 | containing "." and ".." entries */ | 1653 | containing "." and ".." entries */ |
1656 | static int reiserfs_new_directory(struct reiserfs_transaction_handle *th, | 1654 | static int reiserfs_new_directory(struct reiserfs_transaction_handle *th, |
1657 | struct inode *inode, | 1655 | struct inode *inode, |
1658 | struct item_head *ih, struct path *path, | 1656 | struct item_head *ih, struct treepath *path, |
1659 | struct inode *dir) | 1657 | struct inode *dir) |
1660 | { | 1658 | { |
1661 | struct super_block *sb = th->t_super; | 1659 | struct super_block *sb = th->t_super; |
@@ -1714,7 +1712,7 @@ static int reiserfs_new_directory(struct reiserfs_transaction_handle *th, | |||
1714 | containing the body of symlink */ | 1712 | containing the body of symlink */ |
1715 | static int reiserfs_new_symlink(struct reiserfs_transaction_handle *th, struct inode *inode, /* Inode of symlink */ | 1713 | static int reiserfs_new_symlink(struct reiserfs_transaction_handle *th, struct inode *inode, /* Inode of symlink */ |
1716 | struct item_head *ih, | 1714 | struct item_head *ih, |
1717 | struct path *path, const char *symname, | 1715 | struct treepath *path, const char *symname, |
1718 | int item_len) | 1716 | int item_len) |
1719 | { | 1717 | { |
1720 | struct super_block *sb = th->t_super; | 1718 | struct super_block *sb = th->t_super; |