Re: [PATCH v2 1/2] nfsd: Add ALLOCATE support

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

 



> +	error = vfs_fallocate(file, flags, offset, len);
> +	if (error == -ENODEV)
> +		return nfserr_inval;
> +	else if (error < 0)
> +		return nfserrno(error);
> +	return nfserrno(commit_metadata(fhp));


Shouldn't this be something like:

	error = vfs_fallocate(file, flags, offset, len);
	if (!error)
		error = commit_metadata(fhp);

	if (error == -ENODEV)
		return nfserr_inval;
	return nfserrno(error);

I think we really should move the ENODEV mapping to nfserrno, but
this patch isn't the right place for that.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux