From d36e027f9ce175f2437dcf681479935e185755a0 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 17 Oct 2013 21:49:01 -0700 Subject: [PATCH] libext2fs: stop iterating dirents when done linking When we've succesfully linked an inode into a directory, we can stop iterating the directory. Signed-off-by: Darrick J. Wong Signed-off-by: Theodore Ts'o --- 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 2f4f54a35..bf3c859a5 100644 --- a/lib/ext2fs/link.c +++ b/lib/ext2fs/link.c @@ -43,7 +43,7 @@ static int link_proc(struct ext2_dir_entry *dirent, int ret = 0; if (ls->done) - return 0; + return DIRENT_ABORT; rec_len = EXT2_DIR_REC_LEN(ls->namelen); -- 2.47.2