Skip to content

Commit

Permalink
pnfsblock: clean up _add_entry
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peng Tao authored and Trond Myklebust committed Jan 12, 2012
1 parent 82b906d commit 57582b3
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions fs/nfs/blocklayout/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 57582b3

Please sign in to comment.