Commit d9efb07d authored by Colin Ian King's avatar Colin Ian King Committed by Andrew Morton
Browse files

fs: hfsplus: make extend error rate limited

Extending a file where there is not enough free space can trigger frequent
extend alloc file error messages and this can easily spam the kernel log. 
Make the error message rate limited.

Link: https://lkml.kernel.org/r/20230719121735.2831164-1-colin.i.king@gmail.com


Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
Cc: Christian Brauner <brauner@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent a7284b0e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -448,7 +448,7 @@ int hfsplus_file_extend(struct inode *inode, bool zeroout)
	if (sbi->alloc_file->i_size * 8 <
	    sbi->total_blocks - sbi->free_blocks + 8) {
		/* extend alloc file */
		pr_err("extend alloc file! (%llu,%u,%u)\n",
		pr_err_ratelimited("extend alloc file! (%llu,%u,%u)\n",
				   sbi->alloc_file->i_size * 8,
				   sbi->total_blocks, sbi->free_blocks);
		return -ENOSPC;