Skip to content

Commit 9c43ff4

Browse files
jtlaytonidryomov
authored andcommitted
ceph: convert to noop_direct_IO
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]>
1 parent 8bb7eca commit 9c43ff4

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

fs/ceph/addr.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,17 +1306,6 @@ static int ceph_write_end(struct file *file, struct address_space *mapping,
13061306
return copied;
13071307
}
13081308

1309-
/*
1310-
* we set .direct_IO to indicate direct io is supported, but since we
1311-
* intercept O_DIRECT reads and writes early, this function should
1312-
* never get called.
1313-
*/
1314-
static ssize_t ceph_direct_io(struct kiocb *iocb, struct iov_iter *iter)
1315-
{
1316-
WARN_ON(1);
1317-
return -EINVAL;
1318-
}
1319-
13201309
const struct address_space_operations ceph_aops = {
13211310
.readpage = ceph_readpage,
13221311
.readahead = ceph_readahead,
@@ -1327,7 +1316,7 @@ const struct address_space_operations ceph_aops = {
13271316
.set_page_dirty = ceph_set_page_dirty,
13281317
.invalidatepage = ceph_invalidatepage,
13291318
.releasepage = ceph_releasepage,
1330-
.direct_IO = ceph_direct_io,
1319+
.direct_IO = noop_direct_IO,
13311320
};
13321321

13331322
static void ceph_block_sigs(sigset_t *oldset)

0 commit comments

Comments
 (0)