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

Commit 5e591a07 authored by Yan Zheng's avatar Yan Zheng Committed by Chris Mason
Browse files

Btrfs: Fix looping on readdir of the subvol roots

parent 0762704b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1465,7 +1465,10 @@ static int btrfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
			di = (struct btrfs_dir_item *)((char *)di + di_len);
		}
	}
	if (key_type == BTRFS_DIR_INDEX_KEY)
		filp->f_pos = INT_LIMIT(typeof(filp->f_pos));
	else
		filp->f_pos++;
nopos:
	ret = 0;
err: