Merge branch 'debugfs_automount' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / drivers / scsi / csiostor / csio_init.c
index 9b9794d42ffe4848180dbf3a593376959483c2b3..d9631e15f7b5c1a389a87b0687a61351d71cf625 100644 (file)
@@ -113,12 +113,9 @@ static const struct file_operations csio_mem_debugfs_fops = {
 void csio_add_debugfs_mem(struct csio_hw *hw, const char *name,
                                 unsigned int idx, unsigned int size_mb)
 {
-       struct dentry *de;
-
-       de = debugfs_create_file(name, S_IRUSR, hw->debugfs_root,
-                                (void *)hw + idx, &csio_mem_debugfs_fops);
-       if (de && de->d_inode)
-               de->d_inode->i_size = size_mb << 20;
+       debugfs_create_file_size(name, S_IRUSR, hw->debugfs_root,
+                                (void *)hw + idx, &csio_mem_debugfs_fops,
+                                size_mb << 20);
 }
 
 static int csio_setup_debugfs(struct csio_hw *hw)