aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/reiserfs/inode.c')
-rw-r--r--fs/reiserfs/inode.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index 9c69bcacad22..254239e6f9e3 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -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) {
@@ -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