Message ID | 20201109125021.360517842@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=upl/=EP=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F689C4741F for <stable@archiver.kernel.org>; Mon, 9 Nov 2020 13:46:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E6B94206B2 for <stable@archiver.kernel.org>; Mon, 9 Nov 2020 13:46:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604929580; bh=Mn+6KCzlChwh59gmr9s1vSh/TJwl8LCLE1iobewZrAo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=GOjWjfAUrnTUTU7dZV8aVIGAmJMzlQQYRylK6+PK/TYehV6Ro7cgVJ5i/iliY1SJn +d6rmNrnfhuYoIln25UXXEx012ROHDNzMRhuYZ8Fmc6vDkK2CXcyaAy21FUHtkWe6a DtpIe1EfYuztWlxvWIw5BNhDr/uF3FSgFh/z4rsk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730071AbgKINqN (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 9 Nov 2020 08:46:13 -0500 Received: from mail.kernel.org ([198.145.29.99]:52382 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730075AbgKIM5y (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 9 Nov 2020 07:57:54 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 96C572076E; Mon, 9 Nov 2020 12:57:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604926672; bh=Mn+6KCzlChwh59gmr9s1vSh/TJwl8LCLE1iobewZrAo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y02KvlE3Nrd7fZXlD2x/eKvJg617hKb33kgI3irTUOW1ZDgNueCUbykXVdXLv2HvG 0exBKFmzgEHCQhDbx9KgyuFHJUP+StZ9Q+wapSGStuFhKBxrpG9t1CzptL+qM+Va/O nT3J6tKf2OMi9Yn5zO55c5mD+m+BdFAfjW/H/cyw= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Chao Yu <yuchao0@huawei.com>, Jaegeuk Kim <jaegeuk@kernel.org>, Eric Biggers <ebiggers@google.com> Subject: [PATCH 4.4 10/86] f2fs crypto: avoid unneeded memory allocation in ->readdir Date: Mon, 9 Nov 2020 13:54:17 +0100 Message-Id: <20201109125021.360517842@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109125020.852643676@linuxfoundation.org> References: <20201109125020.852643676@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -820,15 +820,8 @@ bool f2fs_fill_dentries(struct dir_conte int save_len = fstr->len; int ret; - de_name.name = kmalloc(de_name.len, GFP_NOFS); - if (!de_name.name) - return false; - - memcpy(de_name.name, d->filename[bit_pos], de_name.len); - ret = f2fs_fname_disk_to_usr(d->inode, &de->hash_code, &de_name, fstr); - kfree(de_name.name); if (ret < 0) return true;