From patchwork Tue May 16 23:57:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hyeoncheol Lee X-Patchwork-Id: 9729811 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0E88B6028A for ; Tue, 16 May 2017 23:59:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F374D28435 for ; Tue, 16 May 2017 23:59:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E6B5D288D7; Tue, 16 May 2017 23:59:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7EDE28435 for ; Tue, 16 May 2017 23:59:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752916AbdEPX7x (ORCPT ); Tue, 16 May 2017 19:59:53 -0400 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:51239 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751569AbdEPX7x (ORCPT ); Tue, 16 May 2017 19:59:53 -0400 Received: from unknown (HELO lgemrelse6q.lge.com) (156.147.1.121) by 156.147.23.52 with ESMTP; 17 May 2017 08:59:48 +0900 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: cheol.lee@lge.com Received: from unknown (HELO LGEAEXHB02P.LGE.NET) (165.244.249.26) by 156.147.1.121 with ESMTP; 17 May 2017 08:59:47 +0900 X-Original-SENDERIP: 165.244.249.26 X-Original-MAILFROM: cheol.lee@lge.com Received: from lgekrmhub02.lge.com (10.185.110.12) by LGEAEXHB02P.LGE.NET (165.244.249.22) with Microsoft SMTP Server id 8.3.264.0; Wed, 17 May 2017 08:57:50 +0900 Received: from lgemrelse7q.lge.com ([156.147.1.151]) by lgekrmhub02.lge.com (Lotus Domino Release 8.5.3FP6) with ESMTP id 2017051708574983-2861554 ; Wed, 17 May 2017 08:57:49 +0900 Received: from unknown (HELO localhost.localdomain) (10.177.225.40) by 156.147.1.151 with ESMTP; 17 May 2017 08:57:49 +0900 X-Original-SENDERIP: 10.177.225.40 X-Original-MAILFROM: cheol.lee@lge.com From: Hyunchul Lee To: Richard Weinberger CC: Artem Bityutskiy , , , , , Subject: [PATCH 1/2] ubifs: Fix inode data budget in ubifs_mknod Date: Wed, 17 May 2017 08:57:18 +0900 Message-ID: <1494979038-19361-1-git-send-email-cheol.lee@lge.com> X-Mailer: git-send-email 1.9.1 X-MIMETrack: Itemize by SMTP Server on LGEKRMHUB02/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/05/17 08:57:49, Serialize by Router on LGEKRMHUB02/LGE/LG Group(Release 8.5.3FP6|November 21, 2013) at 2017/05/17 08:57:50, Serialize complete at 2017/05/17 08:57:50 MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Assign inode data budget to budget request correctly. Signed-off-by: Hyunchul Lee --- fs/ubifs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index b777bdd..df67236 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c @@ -1050,7 +1050,6 @@ static int ubifs_mknod(struct inode *dir, struct dentry *dentry, int sz_change; int err, devlen = 0; struct ubifs_budget_req req = { .new_ino = 1, .new_dent = 1, - .new_ino_d = ALIGN(devlen, 8), .dirtied_ino = 1 }; struct fscrypt_name nm; @@ -1068,6 +1067,7 @@ static int ubifs_mknod(struct inode *dir, struct dentry *dentry, devlen = ubifs_encode_dev(dev, rdev); } + req.new_ino_d = ALIGN(devlen, 8); err = ubifs_budget_space(c, &req); if (err) { kfree(dev);