From patchwork Fri Mar 19 00:50:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Theodore Ts'o X-Patchwork-Id: 48091 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id DF468B7CB9 for ; Fri, 19 Mar 2010 11:51:10 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751968Ab0CSAvJ (ORCPT ); Thu, 18 Mar 2010 20:51:09 -0400 Received: from thunk.org ([69.25.196.29]:34404 "EHLO thunker.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751808Ab0CSAvH (ORCPT ); Thu, 18 Mar 2010 20:51:07 -0400 Received: from root (helo=closure.thunk.org) by thunker.thunk.org with local-esmtp (Exim 4.50 #1 (Debian)) id 1NsQQG-0001K7-GG; Thu, 18 Mar 2010 20:50:44 -0400 Received: from tytso by closure.thunk.org with local (Exim 4.69) (envelope-from ) id 1NsQQE-0001EK-5y; Thu, 18 Mar 2010 20:50:42 -0400 From: Theodore Ts'o To: Ext4 Developers List Cc: Theodore Ts'o Subject: [PATCH, RFC 1/3] ext4: Convert calls of ext4_error() to EXT4_ERROR_INODE() Date: Thu, 18 Mar 2010 20:50:40 -0400 Message-Id: <1268959842-4697-1-git-send-email-tytso@mit.edu> X-Mailer: git-send-email 1.6.6.1.1.g974db.dirty X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on thunker.thunk.org); SAEximRunCond expanded to false Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org EXT4_ERROR_INODE() tends to provide better error information and in a more consistent format. Addresses-Google-Bug: #2507977 Signed-off-by: "Theodore Ts'o" --- Yes, there are more calls to ext4_error that we probably want to convert to use ext4_error_inode; this is just for illustrative purposes, and because it's the one which is most obnoxious if there is a bad entry in a particular inode which is referenced over and over again (see patch 3 in this series). fs/ext4/namei.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 0c070fa..0c0cba4 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -1072,9 +1072,9 @@ static struct dentry *ext4_lookup(struct inode *dir, struct dentry *dentry, stru inode = ext4_iget(dir->i_sb, ino); if (unlikely(IS_ERR(inode))) { if (PTR_ERR(inode) == -ESTALE) { - ext4_error(dir->i_sb, - "deleted inode referenced: %u", - ino); + EXT4_ERROR_INODE(dir, + "deleted inode referenced: %u", + ino); return ERR_PTR(-EIO); } else { return ERR_CAST(inode);