From patchwork Thu Mar 24 23:07:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 660691 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2ON8plj027100 for ; Thu, 24 Mar 2011 23:08:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934348Ab1CXXIr (ORCPT ); Thu, 24 Mar 2011 19:08:47 -0400 Received: from twin.jikos.cz ([89.185.236.188]:54376 "EHLO twin.jikos.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934347Ab1CXXIr (ORCPT ); Thu, 24 Mar 2011 19:08:47 -0400 Received: from twin.jikos.cz (dave@localhost [127.0.0.1]) by twin.jikos.cz (8.13.6/8.13.6) with ESMTP id p2ON832i028969 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 25 Mar 2011 00:08:04 +0100 Received: (from dave@localhost) by twin.jikos.cz (8.13.6/8.13.6/Submit) id p2ON7x7Q028964; Fri, 25 Mar 2011 00:07:59 +0100 Date: Fri, 25 Mar 2011 00:07:59 +0100 From: David Sterba To: Miao Xie Cc: Chris Mason , Linux Btrfs , Itaru Kitayama , Ito , David Sterba Subject: Re: [PATCH V5 1/2] btrfs: use GFP_NOFS instead of GFP_KERNEL Message-ID: <20110324230759.GK17108@twin.jikos.cz> Reply-To: dave@jikos.cz Mail-Followup-To: Miao Xie , Chris Mason , Linux Btrfs , Itaru Kitayama , Ito , David Sterba References: <4D8B2DE1.2040002@cn.fujitsu.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4D8B2DE1.2040002@cn.fujitsu.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 24 Mar 2011 23:08:51 +0000 (UTC) diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index de34bfa..76b9218 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c @@ -289,7 +289,7 @@ int btrfs_acl_chmod(struct inode *inode) if (IS_ERR(acl) || !acl) return PTR_ERR(acl); - clone = posix_acl_clone(acl, GFP_KERNEL); + clone = posix_acl_clone(acl, GFP_NOFS); posix_acl_release(acl); if (!clone) return -ENOMEM; diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index f447b78..eb5c01d 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -998,7 +998,7 @@ static ssize_t btrfs_file_aio_write(struct kiocb *iocb, nrptrs = min((iov_iter_count(&i) + PAGE_CACHE_SIZE - 1) / PAGE_CACHE_SIZE, PAGE_CACHE_SIZE / (sizeof(struct page *))); - pages = kmalloc(nrptrs * sizeof(struct page *), GFP_KERNEL); + pages = kmalloc(nrptrs * sizeof(struct page *), GFP_NOFS); if (!pages) { ret = -ENOMEM; goto out; diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index d1bace3..e9b9648 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -1644,7 +1644,7 @@ static int btrfs_ioctl_defrag(struct file *file, void __user *argp) goto out; } - range = kzalloc(sizeof(*range), GFP_KERNEL); + range = kzalloc(sizeof(*range), GFP_NOFS); if (!range) { ret = -ENOMEM; goto out; diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index d39a989..5e0fff7 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -399,7 +399,7 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags, * strsep changes the string, duplicate it because parse_options * gets called twice */ - opts = kstrdup(options, GFP_KERNEL); + opts = kstrdup(options, GFP_NOFS); if (!opts) return -ENOMEM; orig = opts; @@ -446,7 +446,7 @@ static int btrfs_parse_early_options(const char *options, fmode_t flags, * mount path doesn't care if it's the default volume or another one. */ if (!*subvol_name) { - *subvol_name = kstrdup(".", GFP_KERNEL); + *subvol_name = kstrdup(".", GFP_NOFS); if (!*subvol_name) return -ENOMEM; }