summaryrefslogtreecommitdiffstats
path: root/fs/fuse/dev.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-09-20 13:51:04 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-09-20 15:52:38 +1000
commit1cce058b29e7eb8a71a72d8bb87eb7b4e0401c22 (patch)
tree493477b7a19606c66de2f003bca83672f2164cad /fs/fuse/dev.c
parentc26afe9e8591f306d79aab8071f1d34e4f60b700 (diff)
parent9d037a777695993ec7437e5f451647dea7919d4c (diff)
Merge remote-tracking branch 'origin/master' into next
(Merge in order to get the PCIe mps/mrss code fixes)
Diffstat (limited to 'fs/fuse/dev.c')
-rw-r--r--fs/fuse/dev.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 168a80f7f12..5cb8614508c 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -258,10 +258,14 @@ void fuse_queue_forget(struct fuse_conn *fc, struct fuse_forget_link *forget,
forget->forget_one.nlookup = nlookup;
spin_lock(&fc->lock);
- fc->forget_list_tail->next = forget;
- fc->forget_list_tail = forget;
- wake_up(&fc->waitq);
- kill_fasync(&fc->fasync, SIGIO, POLL_IN);
+ if (fc->connected) {
+ fc->forget_list_tail->next = forget;
+ fc->forget_list_tail = forget;
+ wake_up(&fc->waitq);
+ kill_fasync(&fc->fasync, SIGIO, POLL_IN);
+ } else {
+ kfree(forget);
+ }
spin_unlock(&fc->lock);
}