From patchwork Fri Dec 20 05:13:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yongqiang Yang X-Patchwork-Id: 303891 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 A3D242C02A6 for ; Fri, 20 Dec 2013 16:13:58 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754488Ab3LTFN5 (ORCPT ); Fri, 20 Dec 2013 00:13:57 -0500 Received: from mail-ea0-f170.google.com ([209.85.215.170]:44871 "EHLO mail-ea0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751739Ab3LTFN5 (ORCPT ); Fri, 20 Dec 2013 00:13:57 -0500 Received: by mail-ea0-f170.google.com with SMTP id k10so822063eaj.1 for ; Thu, 19 Dec 2013 21:13:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=Qgkv0pBlgyVCZ0oHhheXGECIq62EL4zmP3P9uuPht0I=; b=QEoL4hrcsFZU1227Po+7GIFuxiXwCyXFxuEGa1LNV159I11Yn7uMo0XvYk2+M8M84J VQPValabVpmiZiOAbBcoTxAhLZ7Q311/tLGNU0v6NiG6wJE3pU2Q99bnNMJqi4f55lvW Pyk45k1SlO2L4zVQVoDHp9mmGqu4t2L9jIxqYpZqGqehzlhol8WwoCLSy/Vl6x6DKEla qk9QR3ibWD9wg8F5kRte0MOYqgkDw5ug019H1l0U5C7U62SUfGFMmzmQzHN5L8SK+rsA 4VdBza9FTnf6/L+74l8T4rfEqfJ+OGIt5+Hga3Bkqvkwv1nFlBMPAljNHhRswdgqquK9 p6Iw== X-Received: by 10.15.41.140 with SMTP id s12mr2426197eev.50.1387516433549; Thu, 19 Dec 2013 21:13:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.14.79.129 with HTTP; Thu, 19 Dec 2013 21:13:33 -0800 (PST) In-Reply-To: <1387515880-10185-2-git-send-email-yangyongqiang01@baidu.com> References: <1387515880-10185-1-git-send-email-yangyongqiang01@baidu.com> <1387515880-10185-2-git-send-email-yangyongqiang01@baidu.com> From: Yongqiang Yang Date: Fri, 20 Dec 2013 13:13:33 +0800 Message-ID: Subject: Fwd: [RESEND PATCH 2/2] ext4: ext4_inode_is_fast_symlink should use cluster size To: "Theodore Ts'o" , Ext4 Developers List Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Yongqiang Yang can be reproduced by xfstests 62 with bigalloc and 128bit size inode. Signed-off-by: Yongqiang Yang Reviewed-by: Carlos Maiolino --- fs/ext4/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) } -- 1.8.5.2 -- 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/ext4/inode.c b/fs/ext4/inode.c index 9115f28..1869fcf 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -145,7 +145,7 @@ static int ext4_meta_trans_blocks(struct inode *inode, int lblocks, static int ext4_inode_is_fast_symlink(struct inode *inode) { int ea_blocks = EXT4_I(inode)->i_file_acl ? - (inode->i_sb->s_blocksize >> 9) : 0; + EXT4_CLUSTER_SIZE(inode->i_sb) >> 9 : 0; return (S_ISLNK(inode->i_mode) && inode->i_blocks - ea_blocks == 0);