Skip to contentSkip to conversation

linux-next: build failure after merge of the xfs tree

PATCH Stephen Rothwell 1 participant 1 message Apr 20, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the xfs tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

fs/xfs/xfs_file.c: In function 'xfs_file_dio_aio_write':
fs/xfs/xfs_file.c:744:8: warning: passing argument 1 of 'mapping->a_ops->direct_IO' makes pointer from integer without a cast

  ret = mapping->a_ops->direct_IO(WRITE, iocb, &data, pos);
        ^

fs/xfs/xfs_file.c:744:8: note: expected 'struct kiocb *' but argument is of type 'long long unsigned int' fs/xfs/xfs_file.c:744:8: warning: passing argument 2 of 'mapping->a_ops->direct_IO' from incompatible pointer type fs/xfs/xfs_file.c:744:8: note: expected 'struct iov_iter *' but argument is of type 'struct kiocb *' fs/xfs/xfs_file.c:744:8: warning: passing argument 3 of 'mapping->a_ops->direct_IO' makes integer from pointer without a cast fs/xfs/xfs_file.c:744:8: note: expected 'loff_t' but argument is of type 'struct iov_iter *' fs/xfs/xfs_file.c:744:8: error: too many arguments to function 'mapping->a_ops->direct_IO'

So, my merge resolution was not sufficient :-(

Commit 22c6186ecea0 ("direct_IO: remove rw from a_ops->direct_IO()") removed the first argument from ->direct_IO(), so I added the following merge fix patch.

From: Stephen Rothwell <[email protected]>
Date: Mon, 20 Apr 2015 12:32:00 +1000
Subject: [PATCH] xfs: fix up for direct_IO API change

---
 fs/xfs/xfs_file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_file.c +1 -1
index 0d5053fcd8c5..8121e75352ee 100644
@@ -741,7 +741,7 @@ xfs_file_dio_aio_write(
 	trace_xfs_file_direct_write(ip, count, iocb->ki_pos, 0);
 
 	data = *from;
-	ret = mapping->a_ops->direct_IO(WRITE, iocb, &data, pos);
+	ret = mapping->a_ops->direct_IO(iocb, &data, pos);
 
 	/* see generic_file_direct_write() for why this is necessary */
 	if (mapping->nrpages) {
Signature · 5 lines
2.1.4

-- 
Cheers,
Stephen Rothwell                    [email protected]