From patchwork Wed Jan 16 05:19:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Shilong X-Patchwork-Id: 212149 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 3F1EC2C00A8 for ; Wed, 16 Jan 2013 00:17:13 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756198Ab3AONRL (ORCPT ); Tue, 15 Jan 2013 08:17:11 -0500 Received: from mail-pb0-f45.google.com ([209.85.160.45]:60801 "EHLO mail-pb0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753546Ab3AONRL (ORCPT ); Tue, 15 Jan 2013 08:17:11 -0500 Received: by mail-pb0-f45.google.com with SMTP id mc8so38855pbc.4 for ; Tue, 15 Jan 2013 05:17:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:content-type:content-transfer-encoding; bh=TaNNtFk7xoDv3hZ6g6ugTsOZ/BSksKTrUTYeQHRe4YQ=; b=CGET4jspJcOWtB9nTEmoZnzs8OznOD2SBDYM4forZ7rlSrGAdONg3gCmEG3SEUjMQ7 L6CQsXGvFV/pyZUmUB4gTSi5cflejuRXLhw81QBMaUfDmicSUl+Fr50M/yF2OjFeEt/V 0BV/Iip8A5WC/MoTksNWY9pCorTvaXBIsb/+PvgPY/Zpm/atQIVIXDJxkwGA5V0oa2CC BPJST87ZXK8cHuKL5dOahlKhmQTCHjdT6Uw9aBHxDryY330J92waqr5smoqcnBjJZx9X OPK4W29ZNSl/CjJfZ/Uc59ngSnqsNwcztgzROH2so7VO7kdZ+qqgqq6qO0rwh/E75lPB O2UQ== X-Received: by 10.68.204.103 with SMTP id kx7mr266345466pbc.33.1358255830846; Tue, 15 Jan 2013 05:17:10 -0800 (PST) Received: from [192.168.94.131] ([112.22.174.186]) by mx.google.com with ESMTPS id im5sm9135212pbc.55.2013.01.15.05.17.07 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Jan 2013 05:17:09 -0800 (PST) Message-ID: <50F6384A.1070909@gmail.com> Date: Tue, 15 Jan 2013 21:19:06 -0800 From: Wang Shilong User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: jack@suse.cz CC: linux-ext4@vger.kernel.org Subject: [PATCH V2 1/2] Ext2: return ENOMEM rather than EIO if sb_getblk fails Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Wang Shilong As the only reason that sb_getblks fails is that allocation fails. It will be better to use ENOMEM rather than EIO. Signed-off-by: Wang Shilong --- fs/ext2/xattr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- 1.7.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c index 06209ec..2d7557d 100644 --- a/fs/ext2/xattr.c +++ b/fs/ext2/xattr.c @@ -665,7 +665,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh, if (unlikely(!new_bh)) { ext2_free_blocks(inode, block, 1); mark_inode_dirty(inode); - error = -EIO; + error = -ENOMEM; goto cleanup; } lock_buffer(new_bh);