When we've succesfully linked an inode into a directory, we can stop iterating the directory. Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> --- lib/ext2fs/link.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ext2fs/link.c b/lib/ext2fs/link.c index 2a44575..09e6cb4 100644 --- a/lib/ext2fs/link.c +++ b/lib/ext2fs/link.c @@ -45,7 +45,7 @@ static int link_proc(struct ext2_dir_entry *dirent, struct ext2_dir_entry_tail *t; if (ls->done) - return 0; + return DIRENT_ABORT; rec_len = EXT2_DIR_REC_LEN(ls->namelen); -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html