Skip to content

Commit

Permalink
[SUNRPC]: cleanup: use seq_release_private() where appropriate
Browse files Browse the repository at this point in the history
We can save some lines of code by using seq_release_private().

Signed-off-by: Martin Peschke <[email protected]>
Acked-by: Neil Brown <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Martin Peschke authored and davem330 committed Apr 26, 2007
1 parent f8a6d97 commit 14690fc
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions net/sunrpc/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1237,20 +1237,12 @@ static int content_open(struct inode *inode, struct file *file)

return res;
}
static int content_release(struct inode *inode, struct file *file)
{
struct seq_file *m = (struct seq_file *)file->private_data;
struct handle *han = m->private;
kfree(han);
m->private = NULL;
return seq_release(inode, file);
}

static const struct file_operations content_file_operations = {
.open = content_open,
.read = seq_read,
.llseek = seq_lseek,
.release = content_release,
.release = seq_release_private,
};

static ssize_t read_flush(struct file *file, char __user *buf,
Expand Down

0 comments on commit 14690fc

Please sign in to comment.