From: Peng Tao <bergwolf@gmail.com>
To: Trond.Myklebust@netapp.com
Cc: linux-nfs@vger.kernel.org, mdw@umich.edu, honey@citi.umich.edu,
Peng Tao <peng_tao@emc.com>, Benny Halevy <bhalevy@tonian.com>
Subject: [PATCH RESEND 6/9] pnfsblock: clean up _add_entry
Date: Tue, 10 Jan 2012 22:30:32 +0800 [thread overview]
Message-ID: <1326205835-2011-7-git-send-email-bergwolf@gmail.com> (raw)
In-Reply-To: <1326205835-2011-1-git-send-email-bergwolf@gmail.com>
It is wrong to kmalloc in _add_entry() as it is inside
spinlock. memory should be already allocated _add_entry() is called.
Signed-off-by: Peng Tao <peng_tao@emc.com>
Signed-off-by: Benny Halevy <bhalevy@tonian.com>
---
fs/nfs/blocklayout/extents.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/fs/nfs/blocklayout/extents.c b/fs/nfs/blocklayout/extents.c
index f383524..d0f52ed 100644
--- a/fs/nfs/blocklayout/extents.c
+++ b/fs/nfs/blocklayout/extents.c
@@ -110,13 +110,7 @@ static int _add_entry(struct my_tree *tree, u64 s, int32_t tag,
return 0;
} else {
struct pnfs_inval_tracking *new;
- if (storage)
- new = storage;
- else {
- new = kmalloc(sizeof(*new), GFP_NOFS);
- if (!new)
- return -ENOMEM;
- }
+ new = storage;
new->it_sector = s;
new->it_tags = (1 << tag);
list_add(&new->it_link, &pos->it_link);
--
1.7.1.262.g5ef3d
next prev parent reply other threads:[~2012-01-10 14:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-10 14:30 [PATCH RESEND 0/9] pnfsblock patches for 3.3 post-rc1 Peng Tao
2012-01-10 14:30 ` [PATCH RESEND 1/9] pnfsblock: cleanup bl_mark_sectors_init Peng Tao
2012-01-10 14:30 ` [PATCH RESEND 3/9] pnfsblock: move find lock page logic out of bl_write_pagelist Peng Tao
2012-01-10 14:30 ` [PATCH RESEND 4/9] pnfsblock: set read/write tk_status to pnfs_error Peng Tao
2012-01-10 14:30 ` [PATCH RESEND 5/9] pnfsblock: remove rpc_call_ops from struct parallel_io Peng Tao
2012-01-10 14:30 ` Peng Tao [this message]
2012-01-10 14:30 ` [PATCH RESEND 7/9] pnfsblock: alloc short extent before submit bio Peng Tao
2012-01-10 16:14 ` [PATCH RESEND 0/9] pnfsblock patches for 3.3 post-rc1 Jim Rees
2012-01-10 16:35 ` Peng Tao
2012-01-11 19:44 ` Trond Myklebust
2012-01-12 15:09 ` Peng Tao
2012-01-11 19:47 ` Trond Myklebust
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1326205835-2011-7-git-send-email-bergwolf@gmail.com \
--to=bergwolf@gmail.com \
--cc=Trond.Myklebust@netapp.com \
--cc=bhalevy@tonian.com \
--cc=honey@citi.umich.edu \
--cc=linux-nfs@vger.kernel.org \
--cc=mdw@umich.edu \
--cc=peng_tao@emc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.