From patchwork Mon Nov 11 15:27:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Wang X-Patchwork-Id: 3167961 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3F84F9F39E for ; Mon, 11 Nov 2013 15:41:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9F01620103 for ; Mon, 11 Nov 2013 15:41:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3F444200D5 for ; Mon, 11 Nov 2013 15:41:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754497Ab3KKPlc (ORCPT ); Mon, 11 Nov 2013 10:41:32 -0500 Received: from m53-178.qiye.163.com ([123.58.178.53]:52863 "EHLO m53-178.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754464Ab3KKPl2 (ORCPT ); Mon, 11 Nov 2013 10:41:28 -0500 Received: from localhost.localdomain (unknown [121.33.255.10]) by m53-178.qiye.163.com (HMail) with ESMTPA id BAED613A815A; Mon, 11 Nov 2013 23:41:25 +0800 (CST) From: Li Wang To: linux-kernel@vger.kernel.org Cc: ceph-devel@vger.kernel.org, Sage Weil , linux-fsdevel@vger.kernel.org, linux-cifs@vger.kernel.org, Milosz Tanski , Li Wang Subject: [PATCH 5/7] Cifs: Introduce routine for uncaching single no-data page Date: Mon, 11 Nov 2013 23:27:27 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: X-HM-Spam-Status: e1koWUFPN1dZCBgUCR5ZQU5VQ0hLS0tLT0tLTk9ISUpIV1kJDhceCFlBWS grPSQoND0vPToyNyQyNSQzPjo*PilBS1VLQDYjJCI#KCQyNSQzPjo*PilBS1VLQCsvKSQ1NCQyNS QzPjo*PilBSVVLQDg0LjUvKSIkODVBS1VLQCk#PDI0NSQ6KDI6QUtVS0ArKTQtMjU4PiQ8Ljo1PD 80NTxBS1VLQD8iNTo2MjgkMiskNTQkMjUkMz46Pz4pQUtVS0A2LjcvMiQpOCsvJD8yPT0#KT41Ly QyNSQzPjo*PilBSVVLQDIrJC80PzoiJDg1LyRLJEpLS0FLVUtAMiskTiQ2MjUuLz4kODUvJEskSk tBS1VLQDIrJEhLJDYyNS4vPiQ4NS8kSyROS0FLVUtAMiskSiQzNC4pJDg1LyRLJEpLS0FLVUtAMi skSiQ2MjUuLz4kODUvJEskSktBS1VLQCguOSQ#QUpVTk5APTUkKC45JD41LDQpPygkMzcxJEpLS0 lLSkFLVUlDWQY+ X-HM-Sender-Digest: e1kSHx4VD1lBWUc6MQg6Cjo4LDo4EDorKjhIOj4qOkMwCjFVSlVKSENP SkNPT0NNS0NIVTMWGhIXVRcSDBoVHDsOGQ4VDw4QAhcSFVUYFBZFWVdZDB4ZWUEdGhcIHldZCAFZ QUlCQko3V1kSC1lBWUpJSlVISFVJTk5VSktZBg++ Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Introduce a routine for uncaching single no-data page, typically in readpage(). Signed-off-by: Li Wang --- fs/cifs/fscache.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/fs/cifs/fscache.h b/fs/cifs/fscache.h index 24794b6..c712f42 100644 --- a/fs/cifs/fscache.h +++ b/fs/cifs/fscache.h @@ -54,6 +54,7 @@ extern int __cifs_readpages_from_fscache(struct inode *, struct address_space *, struct list_head *, unsigned *); +extern void __cifs_fscache_readpage_cancel(struct inode *, struct page *); extern void __cifs_fscache_readpages_cancel(struct inode *, struct list_head *); extern void __cifs_readpage_to_fscache(struct inode *, struct page *); @@ -92,6 +93,13 @@ static inline void cifs_readpage_to_fscache(struct inode *inode, __cifs_readpage_to_fscache(inode, page); } +static inline void cifs_fscache_readpage_cancel(struct inode *inode, + struct page *page) +{ + if (CIFS_I(inode)->fscache) + return __cifs_fscache_readpage_cancel(inode, page); +} + static inline void cifs_fscache_readpages_cancel(struct inode *inode, struct list_head *pages) { @@ -139,6 +147,11 @@ static inline int cifs_readpages_from_fscache(struct inode *inode, static inline void cifs_readpage_to_fscache(struct inode *inode, struct page *page) {} +static inline void cifs_fscache_readpage_cancel(struct inode *inode, + struct page *page) +{ +} + static inline void cifs_fscache_readpages_cancel(struct inode *inode, struct list_head *pages) {