On Thu, Dec 03, 2015 at 12:59:49PM +0100, Christoph Hellwig wrote:
> Pass a loff_t end for the last byte instead of the 32-bit count
> parameter to allow full file clones even on 32-bit architectures.
> While we're at it also drop the pointless inode argument and simplify
> the read/write selection.
locks_mandatory_area() contains this:
if (filp && !(filp->f_flags & O_NONBLOCK))
sleep = true;
which is a strong hint that filp might be NULL. And indeed it might -
error = locks_verify_truncate(inode, NULL, length);
in vfs_truncate() and
host_err = locks_verify_truncate(inode, NULL, iap->ia_size);
in nfsd_get_write_access(). Both are broken by that commit.
Where the hell would truncate(2) get struct file, anyway? IOW, the inode
argument is _not_ pointless; re-added.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html