diff options
author | Christoph Hellwig <hch@lst.de> | 2021-06-22 09:43:56 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-06-22 09:46:28 +0200 |
commit | c886fa3cf6ffbe13006053ceb27c93d41928de30 (patch) | |
tree | 20555a12703775c376cff215a75b6a4e6dcd2a29 /fs/configfs | |
parent | configfs: fix memleak in configfs_release_bin_file (diff) | |
download | linux-c886fa3cf6ffbe13006053ceb27c93d41928de30.tar.xz linux-c886fa3cf6ffbe13006053ceb27c93d41928de30.zip |
configfs: simplify configfs_release_bin_file
Remove the clearing of various fields just before freeing the
buffer structure.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/configfs')
-rw-r--r-- | fs/configfs/file.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/configfs/file.c b/fs/configfs/file.c index 396418333513..2f63bf3a7325 100644 --- a/fs/configfs/file.c +++ b/fs/configfs/file.c @@ -393,11 +393,8 @@ static int configfs_release_bin_file(struct inode *inode, struct file *file) { struct configfs_buffer *buffer = file->private_data; - buffer->read_in_progress = false; - if (buffer->write_in_progress) { struct configfs_fragment *frag = to_frag(file); - buffer->write_in_progress = false; down_read(&frag->frag_sem); if (!frag->frag_dead) { @@ -410,9 +407,6 @@ static int configfs_release_bin_file(struct inode *inode, struct file *file) } vfree(buffer->bin_buffer); - buffer->bin_buffer = NULL; - buffer->bin_buffer_size = 0; - buffer->needs_read_fill = 1; configfs_release(inode, file); return 0; |