|
@@ -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);
|
|
|
}
|
|
|
|