Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217785
b: refs/heads/master
c: 306fb09
h: refs/heads/master
i:
  217783: e581090
v: v3
  • Loading branch information
Chris Mason authored and Al Viro committed Oct 26, 2010
1 parent 55e5fa9 commit 8794fb8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e1455d1bdccbe056ba53479741b1452106ce59aa
refs/heads/master: 306fb0979443419288594446a348155a8027dcf2
15 changes: 14 additions & 1 deletion trunk/fs/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,20 @@ static void aio_batch_add(struct address_space *mapping,
}

abe = mempool_alloc(abe_pool, GFP_KERNEL);
BUG_ON(!igrab(mapping->host));

/*
* we should be using igrab here, but
* we don't want to hammer on the global
* inode spinlock just to take an extra
* reference on a file that we must already
* have a reference to.
*
* When we're called, we always have a reference
* on the file, so we must always have a reference
* on the inode, so igrab must always just
* bump the count and move on.
*/
atomic_inc(&mapping->host->i_count);
abe->mapping = mapping;
hlist_add_head(&abe->list, &batch_hash[bucket]);
return;
Expand Down

0 comments on commit 8794fb8

Please sign in to comment.