aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-07 20:59:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-07 20:59:17 -0400
commita7963eb7f4c4b5df84d5dd5083734278ad75bafb (patch)
tree65ac1402e20651b9fc59207480bac8399a30771e /fs/reiserfs
parentb003d7706abc5d75cb58de0c9de8f1fc77e57008 (diff)
parent01d8885785a60ae8f4c37b0ed75bdc96d0fc6a44 (diff)
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull ext3 improvements, cleanups, reiserfs fix from Jan Kara: "various cleanups for ext2, ext3, udf, isofs, a documentation update for quota, and a fix of a race in reiserfs readdir implementation" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: reiserfs: fix race in readdir ext2: acl: remove unneeded include of linux/capability.h ext3: explicitly remove inode from orphan list after failed direct io fs/isofs/inode.c add __init to init_inodecache() ext3: Speedup WB_SYNC_ALL pass fs/quota/Kconfig: Update filesystems ext3: Update outdated comment before ext3_ordered_writepage() ext3: Update PF_MEMALLOC handling in ext3_write_inode() ext2/3: use prandom_u32() instead of get_random_bytes() ext3: remove an unneeded check in ext3_new_blocks() ext3: remove unneeded check in ext3_ordered_writepage() fs: Mark function as static in ext3/xattr_security.c fs: Mark function as static in ext3/dir.c fs: Mark function as static in ext2/xattr_security.c ext3: Add __init macro to init_inodecache ext2: Add __init macro to init_inodecache udf: Add __init macro to init_inodecache fs: udf: parse_options: blocksize check
Diffstat (limited to 'fs/reiserfs')
-rw-r--r--fs/reiserfs/dir.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c
index 1fd2051109a3..af677353a3f5 100644
--- a/fs/reiserfs/dir.c
+++ b/fs/reiserfs/dir.c
@@ -125,6 +125,7 @@ int reiserfs_readdir_inode(struct inode *inode, struct dir_context *ctx)
125 int d_reclen; 125 int d_reclen;
126 char *d_name; 126 char *d_name;
127 ino_t d_ino; 127 ino_t d_ino;
128 loff_t cur_pos = deh_offset(deh);
128 129
129 if (!de_visible(deh)) 130 if (!de_visible(deh))
130 /* it is hidden entry */ 131 /* it is hidden entry */
@@ -196,8 +197,9 @@ int reiserfs_readdir_inode(struct inode *inode, struct dir_context *ctx)
196 if (local_buf != small_buf) { 197 if (local_buf != small_buf) {
197 kfree(local_buf); 198 kfree(local_buf);
198 } 199 }
199 // next entry should be looked for with such offset 200
200 next_pos = deh_offset(deh) + 1; 201 /* deh_offset(deh) may be invalid now. */
202 next_pos = cur_pos + 1;
201 203
202 if (item_moved(&tmp_ih, &path_to_entry)) { 204 if (item_moved(&tmp_ih, &path_to_entry)) {
203 set_cpu_key_k_offset(&pos_key, 205 set_cpu_key_k_offset(&pos_key,