aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fscache/object-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fscache/object-list.c')
-rw-r--r--fs/fscache/object-list.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/fs/fscache/object-list.c b/fs/fscache/object-list.c
index b8179ca6bf9d..51dde817e1f2 100644
--- a/fs/fscache/object-list.c
+++ b/fs/fscache/object-list.c
@@ -380,26 +380,14 @@ no_config:
380static int fscache_objlist_open(struct inode *inode, struct file *file) 380static int fscache_objlist_open(struct inode *inode, struct file *file)
381{ 381{
382 struct fscache_objlist_data *data; 382 struct fscache_objlist_data *data;
383 struct seq_file *m;
384 int ret;
385 383
386 ret = seq_open(file, &fscache_objlist_ops); 384 data = __seq_open_private(file, &fscache_objlist_ops, sizeof(*data));
387 if (ret < 0) 385 if (!data)
388 return ret;
389
390 m = file->private_data;
391
392 /* buffer for key extraction */
393 data = kmalloc(sizeof(struct fscache_objlist_data), GFP_KERNEL);
394 if (!data) {
395 seq_release(inode, file);
396 return -ENOMEM; 386 return -ENOMEM;
397 }
398 387
399 /* get the configuration key */ 388 /* get the configuration key */
400 fscache_objlist_config(data); 389 fscache_objlist_config(data);
401 390
402 m->private = data;
403 return 0; 391 return 0;
404} 392}
405 393