diff options
author | Peng Tao <bergwolf@gmail.com> | 2012-01-12 10:18:45 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-01-12 16:38:55 -0500 |
commit | 57582b372f63d0f655b1a35b0d306d73d1a46775 (patch) | |
tree | 27c27ca5a20720d835b901760b52b66060ddb840 /fs/nfs | |
parent | 82b906d6550ee5fe0d5553359b3c9692dd0aed31 (diff) |
pnfsblock: clean up _add_entry
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>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | 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 c69682a4262a..369ef53e89e1 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, | |||
110 | return 0; | 110 | return 0; |
111 | } else { | 111 | } else { |
112 | struct pnfs_inval_tracking *new; | 112 | struct pnfs_inval_tracking *new; |
113 | if (storage) | 113 | new = storage; |
114 | new = storage; | ||
115 | else { | ||
116 | new = kmalloc(sizeof(*new), GFP_NOFS); | ||
117 | if (!new) | ||
118 | return -ENOMEM; | ||
119 | } | ||
120 | new->it_sector = s; | 114 | new->it_sector = s; |
121 | new->it_tags = (1 << tag); | 115 | new->it_tags = (1 << tag); |
122 | list_add(&new->it_link, &pos->it_link); | 116 | list_add(&new->it_link, &pos->it_link); |