Re: [V3 PATCH 1/2] tmpfs: add fallocate support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 23 Nov 2011, Cong Wang wrote:
> +
> +	while (index < end) {
> +		ret = shmem_getpage(inode, index, &page, SGP_WRITE, NULL);
> +		if (ret) {
> +			if (ret == -ENOSPC)
> +				goto undo;
...
> +undo:
> +	while (index > start) {
> +		shmem_truncate_page(inode, index);
> +		index--;
> +	}

As I said before, I won't actually be reviewing and testing this for
a week or two; but before this goes any further, must point out how
wrong it is.  Here you'll be deleting any pages in the range that were
already present before the failing fallocate().

Hugh

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]