diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2015-07-01 10:26:07 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2015-07-01 10:26:07 -0400 |
commit | 1e6881c36ebbfd47298c42fa82b544c4988933fa (patch) | |
tree | c4ed8353c6aaa2cc6d8c4664a8ba181c966d569e /fs/fuse | |
parent | 365ae710df91edc97d24817e3271e01bffaaee32 (diff) |
fuse: cleanup request_end()
Now that we atomically test having already done everything we no longer
need other protection.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Reviewed-by: Ashish Samant <ashish.samant@oracle.com>
Diffstat (limited to 'fs/fuse')
-rw-r--r-- | fs/fuse/dev.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index cd242fc6a92b..4e1144a38438 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -383,14 +383,12 @@ static void request_end(struct fuse_conn *fc, struct fuse_req *req) | |||
383 | __releases(fc->lock) | 383 | __releases(fc->lock) |
384 | { | 384 | { |
385 | struct fuse_iqueue *fiq = &fc->iq; | 385 | struct fuse_iqueue *fiq = &fc->iq; |
386 | void (*end) (struct fuse_conn *, struct fuse_req *) = req->end; | ||
387 | 386 | ||
388 | if (test_and_set_bit(FR_FINISHED, &req->flags)) { | 387 | if (test_and_set_bit(FR_FINISHED, &req->flags)) { |
389 | spin_unlock(&fc->lock); | 388 | spin_unlock(&fc->lock); |
390 | return; | 389 | return; |
391 | } | 390 | } |
392 | 391 | ||
393 | req->end = NULL; | ||
394 | spin_lock(&fiq->waitq.lock); | 392 | spin_lock(&fiq->waitq.lock); |
395 | list_del_init(&req->intr_entry); | 393 | list_del_init(&req->intr_entry); |
396 | spin_unlock(&fiq->waitq.lock); | 394 | spin_unlock(&fiq->waitq.lock); |
@@ -416,8 +414,8 @@ __releases(fc->lock) | |||
416 | } | 414 | } |
417 | spin_unlock(&fc->lock); | 415 | spin_unlock(&fc->lock); |
418 | wake_up(&req->waitq); | 416 | wake_up(&req->waitq); |
419 | if (end) | 417 | if (req->end) |
420 | end(fc, req); | 418 | req->end(fc, req); |
421 | fuse_put_request(fc, req); | 419 | fuse_put_request(fc, req); |
422 | } | 420 | } |
423 | 421 | ||