Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb659ca1 authored by wang di's avatar wang di Committed by Greg Kroah-Hartman
Browse files

staging: lustre: llite: set next only when needed in ll_dir_read



The variable next needs only to be set when done is false.

Signed-off-by: default avatarwang di <di.wang@intel.com>
Reviewed-on: http://review.whamcloud.com/10761
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4906


Reviewed-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b1f048c1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -561,8 +561,9 @@ int ll_dir_read(struct inode *inode, struct md_op_data *op_data,
			done = !dir_emit(ctx, ent->lde_name,
					 namelen, ino, type);
		}
		next = le64_to_cpu(dp->ldp_hash_end);

		if (!done) {
			next = le64_to_cpu(dp->ldp_hash_end);
			pos = next;
			if (pos == MDS_DIR_END_OFF) {
				/*