[PATCH] fscache: don't duplicate seq_release_private

From: Rasmus Villemoes
Date: Thu Aug 16 2018 - 09:37:39 EST


Replace fscache_objlist_release by the completely equivalent
seq_release_private.

Signed-off-by: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>
---
fs/fscache/object-list.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/fs/fscache/object-list.c b/fs/fscache/object-list.c
index 43e6e28c164f..3e1c97d34e25 100644
--- a/fs/fscache/object-list.c
+++ b/fs/fscache/object-list.c
@@ -397,21 +397,9 @@ static int fscache_objlist_open(struct inode *inode, struct file *file)
return 0;
}

-/*
- * clean up on close
- */
-static int fscache_objlist_release(struct inode *inode, struct file *file)
-{
- struct seq_file *m = file->private_data;
-
- kfree(m->private);
- m->private = NULL;
- return seq_release(inode, file);
-}
-
const struct file_operations fscache_objlist_fops = {
.open = fscache_objlist_open,
.read = seq_read,
.llseek = seq_lseek,
- .release = fscache_objlist_release,
+ .release = seq_release_private,
};
--
2.16.4