aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/reiserfs/dir.c')
-rw-r--r--fs/reiserfs/dir.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c
index 9dd71e807034..d71ac6579289 100644
--- a/fs/reiserfs/dir.c
+++ b/fs/reiserfs/dir.c
@@ -150,18 +150,15 @@ static int reiserfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
150 if (d_reclen <= 32) { 150 if (d_reclen <= 32) {
151 local_buf = small_buf; 151 local_buf = small_buf;
152 } else { 152 } else {
153 local_buf = 153 local_buf = kmalloc(d_reclen,
154 reiserfs_kmalloc(d_reclen, GFP_NOFS, 154 GFP_NOFS);
155 inode->i_sb);
156 if (!local_buf) { 155 if (!local_buf) {
157 pathrelse(&path_to_entry); 156 pathrelse(&path_to_entry);
158 ret = -ENOMEM; 157 ret = -ENOMEM;
159 goto out; 158 goto out;
160 } 159 }
161 if (item_moved(&tmp_ih, &path_to_entry)) { 160 if (item_moved(&tmp_ih, &path_to_entry)) {
162 reiserfs_kfree(local_buf, 161 kfree(local_buf);
163 d_reclen,
164 inode->i_sb);
165 goto research; 162 goto research;
166 } 163 }
167 } 164 }
@@ -174,15 +171,12 @@ static int reiserfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
174 (dirent, local_buf, d_reclen, d_off, d_ino, 171 (dirent, local_buf, d_reclen, d_off, d_ino,
175 DT_UNKNOWN) < 0) { 172 DT_UNKNOWN) < 0) {
176 if (local_buf != small_buf) { 173 if (local_buf != small_buf) {
177 reiserfs_kfree(local_buf, 174 kfree(local_buf);
178 d_reclen,
179 inode->i_sb);
180 } 175 }
181 goto end; 176 goto end;
182 } 177 }
183 if (local_buf != small_buf) { 178 if (local_buf != small_buf) {
184 reiserfs_kfree(local_buf, d_reclen, 179 kfree(local_buf);
185 inode->i_sb);
186 } 180 }
187 // next entry should be looked for with such offset 181 // next entry should be looked for with such offset
188 next_pos = deh_offset(deh) + 1; 182 next_pos = deh_offset(deh) + 1;