Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751752AbdFZTWF (ORCPT ); Mon, 26 Jun 2017 15:22:05 -0400 Received: from mail-yw0-f181.google.com ([209.85.161.181]:33345 "EHLO mail-yw0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751493AbdFZTWE (ORCPT ); Mon, 26 Jun 2017 15:22:04 -0400 MIME-Version: 1.0 In-Reply-To: <20170624002454.wjieb3ppvljumzzj@thunk.org> References: <20170622232307.48392-1-khazhy@google.com> <20170623044314.7f23ighkelnpgnah@thunk.org> <204110E6-EECE-4925-9020-EC6D9633C822@dilger.ca> <20170623122603.jmvyw4oqkojcapv3@thunk.org> <20170623232616.r3ffksjntjfbrzgb@thunk.org> <54BEB476-F6E0-4421-B381-92442457910F@dilger.ca> <20170624002454.wjieb3ppvljumzzj@thunk.org> From: Tahsin Erdogan Date: Mon, 26 Jun 2017 12:22:02 -0700 Message-ID: Subject: Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry To: "Theodore Ts'o" , Andreas Dilger , Khazhismel Kumykov , linux-ext4 , lkml Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 738 Lines: 13 On Thu, Jun 22, 2017 at 4:23 PM, Khazhismel Kumykov wrote: > - /* read error, skip block & hope for the best */ > EXT4_ERROR_INODE(dir, "reading directory lblock %lu", > (unsigned long) block); > brelse(bh); > - goto next; > + ret = ERR_PTR(-EIO); > + goto cleanup_and_exit; EXT4_ERROR_INODE() triggers ext4_handle_error() which performs error handling. I think it should be removed here because we are returning the error to the caller and there is nothing more drastic about this error than other error return paths in the same function.