Skip to content

Commit

Permalink
configfs: simplify configfs_release_bin_file
Browse files Browse the repository at this point in the history
Remove the clearing of various fields just before freeing the
buffer structure.

Signed-off-by: Christoph Hellwig <[email protected]>
  • Loading branch information
Christoph Hellwig committed Jun 22, 2021
1 parent 3c252b0 commit c886fa3
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions fs/configfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand Down

0 comments on commit c886fa3

Please sign in to comment.