Skip to content

Commit

Permalink
ceph: convert to noop_direct_IO
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Ilya Dryomov <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
  • Loading branch information
jtlayton authored and idryomov committed Nov 8, 2021
1 parent 8bb7eca commit 9c43ff4
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions fs/ceph/addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1306,17 +1306,6 @@ static int ceph_write_end(struct file *file, struct address_space *mapping,
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,
Expand All @@ -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)
Expand Down

0 comments on commit 9c43ff4

Please sign in to comment.