Skip to content

Commit

Permalink
afs: afs_vnode_commit_status() doesn't need to check the RPC error
Browse files Browse the repository at this point in the history
afs_vnode_commit_status() is only ever called if op->error is 0, so remove
the op->error checks from the function.

Fixes: e49c7b2 ("afs: Build an abstraction around an "operation" concept")
Signed-off-by: David Howells <dhowells@redhat.com>
  • Loading branch information
dhowells committed Jun 16, 2020
1 parent 728279a commit 7c295ee
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/afs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,6 @@ void afs_vnode_commit_status(struct afs_operation *op, struct afs_vnode_param *v

_enter("");

ASSERTCMP(op->error, ==, 0);

write_seqlock(&vnode->cb_lock);

if (vp->scb.have_error) {
Expand All @@ -300,7 +298,7 @@ void afs_vnode_commit_status(struct afs_operation *op, struct afs_vnode_param *v

write_sequnlock(&vnode->cb_lock);

if (op->error == 0 && vp->scb.have_status)
if (vp->scb.have_status)
afs_cache_permit(vnode, op->key, vp->cb_break_before, &vp->scb);
}

Expand Down

0 comments on commit 7c295ee

Please sign in to comment.