From patchwork Thu Sep 23 11:58:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 12512449 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54709C433EF for ; Thu, 23 Sep 2021 11:58:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 307006115A for ; Thu, 23 Sep 2021 11:58:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240700AbhIWMAJ (ORCPT ); Thu, 23 Sep 2021 08:00:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:60274 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240678AbhIWMAI (ORCPT ); Thu, 23 Sep 2021 08:00:08 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DE70161107; Thu, 23 Sep 2021 11:58:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632398317; bh=CmJyZGitG74sT8IAbrfCwdinj+v51hGvAGkDYlG7zcI=; h=From:To:Cc:Subject:Date:From; b=NrMeKA6RPfz3NCjjx8wwHCgAJFUEsZ+GqEAw64KMq1YqXOgcf2OgOBzeQRP6Eoynv crTFUVY1LnTrdR+HdG9RNIv97o9vd3rkLm3I9cQ1Vu4x943RpNOuzrA32Ek3DbmzfA EFzuqWKiiHVKGq5DxWKxlyD7l/YHBIUk/27j+IElP9O0UvPwAxz1cEbBj5bI0SnwWx /7VJTTlyXWaACDnMLJ6oFubVg+KVbwqC6IeavX2JQxb3r4vFtsq/f26LojCukhlyhR I7eaM0khVDFKQp8jbwNvPa5RWptf70gEThYAIr3BpExbbAiQCdRYeu0crlxNJJQ6Ct EWlJoj3heNq2A== From: Jeff Layton To: ceph-devel@vger.kernel.org Cc: idryomov@gmail.com, Matthew Wilcox Subject: [PATCH] ceph: convert to noop_direct_IO Date: Thu, 23 Sep 2021 07:58:35 -0400 Message-Id: <20210923115835.16513-1-jlayton@kernel.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org 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. Cc: Matthew Wilcox Signed-off-by: Jeff Layton --- fs/ceph/addr.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index e09bfda37e6d..b39aebc2ed95 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -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, @@ -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)