From patchwork Tue Jan 20 16:20:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Tao X-Patchwork-Id: 5670341 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5DD21C058D for ; Tue, 20 Jan 2015 16:31:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 94702203B0 for ; Tue, 20 Jan 2015 16:31:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B120D20303 for ; Tue, 20 Jan 2015 16:31:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752816AbbATQbb (ORCPT ); Tue, 20 Jan 2015 11:31:31 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:63224 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752448AbbATQba (ORCPT ); Tue, 20 Jan 2015 11:31:30 -0500 Received: by mail-pa0-f47.google.com with SMTP id lj1so2365182pab.6 for ; Tue, 20 Jan 2015 08:31:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=kRITbUhnHKvRp8qUTmTAh13lmxKn3trEi4v6XZODLx4=; b=GWfsyljSzkYRt6baT7W+TaOlSNvv6yNE6y9vMCAHXnnsWSDbvC1JP3VtWPZ0AAfFsF +KDGep8y97/nKBgCLs6/N9BIRLSrrWbOXhYoEPF3JrG+Jz0vJXxhnuheNWDlOMflRwfd UV+mefn/H/p2Pao535xbtqjEPXKcu83qDiutOpML/i7iCMgv3sm/rFfVrqyTaQX9QV8g 7Yb/X3kCo3xFkh5n3F3v/XcH/snrpNz4SeMNk8XllEp603b8WG/PaaivB8CAOytHmW6c peigix3wFqb0Ti4XOOpQZhtLIwfrChbKIsW43JnQHfLPnmsAk829oOeTBc0Mg3aEIeyF 4Dzw== X-Gm-Message-State: ALoCoQlC1Drz7ZFcq35vgSzIVjkstCrmB2CvQoVAJrlCgb7DmZf0RM71HKSL19K7w/KpKcO9oHjr X-Received: by 10.68.241.35 with SMTP id wf3mr55892579pbc.22.1421771490450; Tue, 20 Jan 2015 08:31:30 -0800 (PST) Received: from localhost.localdomain (ec2-54-65-164-9.ap-northeast-1.compute.amazonaws.com. [54.65.164.9]) by mx.google.com with ESMTPSA id c6sm488076pdp.60.2015.01.20.08.31.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jan 2015 08:31:29 -0800 (PST) From: Peng Tao To: linux-nfs@vger.kernel.org Cc: Trond Myklebust , Peng Tao Subject: [PATCH] nfs: clean up nfs_direct_IO Date: Wed, 21 Jan 2015 00:20:11 +0800 Message-Id: <1421770811-25358-1-git-send-email-tao.peng@primarydata.com> X-Mailer: git-send-email 1.9.1 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This follows up "nfs: fix dio deadlock when O_DIRECT flag is flipped" and removes the unnecessary CONFIG_NFS_SWAP switch. Signed-off-by: Peng Tao --- fs/nfs/direct.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 1184118..645b777 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -259,18 +259,11 @@ ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter, loff_t if (!IS_SWAPFILE(inode)) return 0; -#ifndef CONFIG_NFS_SWAP - dprintk("NFS: nfs_direct_IO (%pD) off/no(%Ld/%lu) EINVAL\n", - iocb->ki_filp, (long long) pos, iter->nr_segs); - - return -EINVAL; -#else VM_BUG_ON(iocb->ki_nbytes != PAGE_SIZE); if (rw == READ) return nfs_file_direct_read(iocb, iter, pos); return nfs_file_direct_write(iocb, iter, pos); -#endif /* CONFIG_NFS_SWAP */ } static void nfs_direct_release_pages(struct page **pages, unsigned int npages)