diff options
Diffstat (limited to 'fs/reiserfs/xattr.c')
-rw-r--r-- | fs/reiserfs/xattr.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index cc061bfd437b..4f0db4e54517 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c | |||
@@ -368,15 +368,13 @@ static int __xattr_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
368 | if (d_reclen <= 32) { | 368 | if (d_reclen <= 32) { |
369 | local_buf = small_buf; | 369 | local_buf = small_buf; |
370 | } else { | 370 | } else { |
371 | local_buf = | 371 | local_buf = kmalloc(d_reclen, GFP_NOFS); |
372 | reiserfs_kmalloc(d_reclen, GFP_NOFS, inode->i_sb); | ||
373 | if (!local_buf) { | 372 | if (!local_buf) { |
374 | pathrelse(&path_to_entry); | 373 | pathrelse(&path_to_entry); |
375 | return -ENOMEM; | 374 | return -ENOMEM; |
376 | } | 375 | } |
377 | if (item_moved(&tmp_ih, &path_to_entry)) { | 376 | if (item_moved(&tmp_ih, &path_to_entry)) { |
378 | reiserfs_kfree(local_buf, d_reclen, | 377 | kfree(local_buf); |
379 | inode->i_sb); | ||
380 | 378 | ||
381 | /* sigh, must retry. Do this same offset again */ | 379 | /* sigh, must retry. Do this same offset again */ |
382 | next_pos = d_off; | 380 | next_pos = d_off; |
@@ -399,13 +397,12 @@ static int __xattr_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
399 | if (filldir(dirent, local_buf, d_reclen, d_off, d_ino, | 397 | if (filldir(dirent, local_buf, d_reclen, d_off, d_ino, |
400 | DT_UNKNOWN) < 0) { | 398 | DT_UNKNOWN) < 0) { |
401 | if (local_buf != small_buf) { | 399 | if (local_buf != small_buf) { |
402 | reiserfs_kfree(local_buf, d_reclen, | 400 | kfree(local_buf); |
403 | inode->i_sb); | ||
404 | } | 401 | } |
405 | goto end; | 402 | goto end; |
406 | } | 403 | } |
407 | if (local_buf != small_buf) { | 404 | if (local_buf != small_buf) { |
408 | reiserfs_kfree(local_buf, d_reclen, inode->i_sb); | 405 | kfree(local_buf); |
409 | } | 406 | } |
410 | } /* while */ | 407 | } /* while */ |
411 | 408 | ||