Skip to content
Commit a1b879ee authored by David Howells's avatar David Howells
Browse files

afs: Fix key leak in afs_release() and afs_evict_inode()



Fix afs_release() to go through the cleanup part of the function if
FMODE_WRITE is set rather than exiting through vfs_fsync() (which skips the
cleanup).  The cleanup involves discarding the refs on the key used for
file ops and the writeback key record.

Also fix afs_evict_inode() to clean up any left over wb keys attached to
the inode/vnode when it is removed.

Fixes: 5a813276 ("afs: Do better accretion of small writes on newly created content")
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent 80f23212
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment