ceph: convert to noop_direct_IO
authorJeff Layton <jlayton@kernel.org>
Thu, 23 Sep 2021 11:50:08 +0000 (07:50 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 8 Nov 2021 02:29:51 +0000 (03:29 +0100)
We have our own op, but the WARN_ON is not terribly helpful, and it's
otherwise identical to the noop one. Just use that.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/addr.c

index 99b80b5c7a931c1d6418e40c2f5a17713f638e22..b429204314196976b67009442cb9bde5f98d25c3 100644 (file)
@@ -1306,17 +1306,6 @@ out:
        return copied;
 }
 
-/*
- * we set .direct_IO to indicate direct io is supported, but since we
- * intercept O_DIRECT reads and writes early, this function should
- * never get called.
- */
-static ssize_t ceph_direct_io(struct kiocb *iocb, struct iov_iter *iter)
-{
-       WARN_ON(1);
-       return -EINVAL;
-}
-
 const struct address_space_operations ceph_aops = {
        .readpage = ceph_readpage,
        .readahead = ceph_readahead,
@@ -1327,7 +1316,7 @@ const struct address_space_operations ceph_aops = {
        .set_page_dirty = ceph_set_page_dirty,
        .invalidatepage = ceph_invalidatepage,
        .releasepage = ceph_releasepage,
-       .direct_IO = ceph_direct_io,
+       .direct_IO = noop_direct_IO,
 };
 
 static void ceph_block_sigs(sigset_t *oldset)