From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: Re: f2fs: callers take care of the page from bio error Date: Wed, 12 Aug 2015 13:40:10 +0300 Message-ID: <20150812104009.GB22571@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1ZPTSQ-0000ci-HY for linux-f2fs-devel@lists.sourceforge.net; Wed, 12 Aug 2015 10:40:30 +0000 Received: from userp1040.oracle.com ([156.151.31.81]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1ZPTSO-0007d7-KT for linux-f2fs-devel@lists.sourceforge.net; Wed, 12 Aug 2015 10:40:30 +0000 Content-Disposition: inline List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net To: jaegeuk@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net Hello Jaegeuk Kim, The patch 86531d6b84bc: "f2fs: callers take care of the page from bio error" from Jul 15, 2015, leads to the following static checker warning: fs/f2fs/node.c:1042 ra_node_page() warn: 'err' can be either negative or positive fs/f2fs/node.c 1025 void ra_node_page(struct f2fs_sb_info *sbi, nid_t nid) 1026 { 1027 struct page *apage; 1028 int err; 1029 1030 apage = find_get_page(NODE_MAPPING(sbi), nid); 1031 if (apage && PageUptodate(apage)) { 1032 f2fs_put_page(apage, 0); 1033 return; 1034 } 1035 f2fs_put_page(apage, 0); 1036 1037 apage = grab_cache_page(NODE_MAPPING(sbi), nid); 1038 if (!apage) 1039 return; 1040 1041 err = read_node_page(apage, READA); 1042 f2fs_put_page(apage, err ? 1 : 0); In the old code we took errors into consideration but now we treat them as LOCKED_PAGE. Is that intentional? A lot of the other callers in that patch still check for errors... 1043 } regards, dan carpenter ------------------------------------------------------------------------------