Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ibmasmfs: don't bother passing superblock when not needed

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro 0507c78a a118cfdf

+12 -14
+12 -14
drivers/misc/ibmasm/ibmasmfs.c
··· 149 149 return ret; 150 150 } 151 151 152 - static struct dentry *ibmasmfs_create_file (struct super_block *sb, 153 - struct dentry *parent, 152 + static struct dentry *ibmasmfs_create_file(struct dentry *parent, 154 153 const char *name, 155 154 const struct file_operations *fops, 156 155 void *data, ··· 162 163 if (!dentry) 163 164 return NULL; 164 165 165 - inode = ibmasmfs_make_inode(sb, S_IFREG | mode); 166 + inode = ibmasmfs_make_inode(parent->d_sb, S_IFREG | mode); 166 167 if (!inode) { 167 168 dput(dentry); 168 169 return NULL; ··· 175 176 return dentry; 176 177 } 177 178 178 - static struct dentry *ibmasmfs_create_dir (struct super_block *sb, 179 - struct dentry *parent, 179 + static struct dentry *ibmasmfs_create_dir(struct dentry *parent, 180 180 const char *name) 181 181 { 182 182 struct dentry *dentry; ··· 185 187 if (!dentry) 186 188 return NULL; 187 189 188 - inode = ibmasmfs_make_inode(sb, S_IFDIR | 0500); 190 + inode = ibmasmfs_make_inode(parent->d_sb, S_IFDIR | 0500); 189 191 if (!inode) { 190 192 dput(dentry); 191 193 return NULL; ··· 610 612 struct dentry *dir; 611 613 struct dentry *remote_dir; 612 614 sp = list_entry(entry, struct service_processor, node); 613 - dir = ibmasmfs_create_dir(sb, sb->s_root, sp->dirname); 615 + dir = ibmasmfs_create_dir(sb->s_root, sp->dirname); 614 616 if (!dir) 615 617 continue; 616 618 617 - ibmasmfs_create_file(sb, dir, "command", &command_fops, sp, S_IRUSR|S_IWUSR); 618 - ibmasmfs_create_file(sb, dir, "event", &event_fops, sp, S_IRUSR|S_IWUSR); 619 - ibmasmfs_create_file(sb, dir, "reverse_heartbeat", &r_heartbeat_fops, sp, S_IRUSR|S_IWUSR); 619 + ibmasmfs_create_file(dir, "command", &command_fops, sp, S_IRUSR|S_IWUSR); 620 + ibmasmfs_create_file(dir, "event", &event_fops, sp, S_IRUSR|S_IWUSR); 621 + ibmasmfs_create_file(dir, "reverse_heartbeat", &r_heartbeat_fops, sp, S_IRUSR|S_IWUSR); 620 622 621 - remote_dir = ibmasmfs_create_dir(sb, dir, "remote_video"); 623 + remote_dir = ibmasmfs_create_dir(dir, "remote_video"); 622 624 if (!remote_dir) 623 625 continue; 624 626 625 - ibmasmfs_create_file(sb, remote_dir, "width", &remote_settings_fops, (void *)display_width(sp), S_IRUSR|S_IWUSR); 626 - ibmasmfs_create_file(sb, remote_dir, "height", &remote_settings_fops, (void *)display_height(sp), S_IRUSR|S_IWUSR); 627 - ibmasmfs_create_file(sb, remote_dir, "depth", &remote_settings_fops, (void *)display_depth(sp), S_IRUSR|S_IWUSR); 627 + ibmasmfs_create_file(remote_dir, "width", &remote_settings_fops, (void *)display_width(sp), S_IRUSR|S_IWUSR); 628 + ibmasmfs_create_file(remote_dir, "height", &remote_settings_fops, (void *)display_height(sp), S_IRUSR|S_IWUSR); 629 + ibmasmfs_create_file(remote_dir, "depth", &remote_settings_fops, (void *)display_depth(sp), S_IRUSR|S_IWUSR); 628 630 } 629 631 }