aboutsummaryrefslogtreecommitdiffstats
path: root/fs/binfmt_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/binfmt_misc.c')
-rw-r--r--fs/binfmt_misc.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
index fd0cc0bf9a40..1befe2ec8186 100644
--- a/fs/binfmt_misc.c
+++ b/fs/binfmt_misc.c
@@ -495,6 +495,7 @@ static struct inode *bm_get_inode(struct super_block *sb, int mode)
495 struct inode * inode = new_inode(sb); 495 struct inode * inode = new_inode(sb);
496 496
497 if (inode) { 497 if (inode) {
498 inode->i_ino = get_next_ino();
498 inode->i_mode = mode; 499 inode->i_mode = mode;
499 inode->i_atime = inode->i_mtime = inode->i_ctime = 500 inode->i_atime = inode->i_mtime = inode->i_ctime =
500 current_fs_time(inode->i_sb); 501 current_fs_time(inode->i_sb);
@@ -576,6 +577,7 @@ static ssize_t bm_entry_write(struct file *file, const char __user *buffer,
576static const struct file_operations bm_entry_operations = { 577static const struct file_operations bm_entry_operations = {
577 .read = bm_entry_read, 578 .read = bm_entry_read,
578 .write = bm_entry_write, 579 .write = bm_entry_write,
580 .llseek = default_llseek,
579}; 581};
580 582
581/* /register */ 583/* /register */
@@ -643,6 +645,7 @@ out:
643 645
644static const struct file_operations bm_register_operations = { 646static const struct file_operations bm_register_operations = {
645 .write = bm_register_write, 647 .write = bm_register_write,
648 .llseek = noop_llseek,
646}; 649};
647 650
648/* /status */ 651/* /status */
@@ -680,6 +683,7 @@ static ssize_t bm_status_write(struct file * file, const char __user * buffer,
680static const struct file_operations bm_status_operations = { 683static const struct file_operations bm_status_operations = {
681 .read = bm_status_read, 684 .read = bm_status_read,
682 .write = bm_status_write, 685 .write = bm_status_write,
686 .llseek = default_llseek,
683}; 687};
684 688
685/* Superblock handling */ 689/* Superblock handling */
@@ -702,10 +706,10 @@ static int bm_fill_super(struct super_block * sb, void * data, int silent)
702 return err; 706 return err;
703} 707}
704 708
705static int bm_get_sb(struct file_system_type *fs_type, 709static struct dentry *bm_mount(struct file_system_type *fs_type,
706 int flags, const char *dev_name, void *data, struct vfsmount *mnt) 710 int flags, const char *dev_name, void *data)
707{ 711{
708 return get_sb_single(fs_type, flags, data, bm_fill_super, mnt); 712 return mount_single(fs_type, flags, data, bm_fill_super);
709} 713}
710 714
711static struct linux_binfmt misc_format = { 715static struct linux_binfmt misc_format = {
@@ -716,7 +720,7 @@ static struct linux_binfmt misc_format = {
716static struct file_system_type bm_fs_type = { 720static struct file_system_type bm_fs_type = {
717 .owner = THIS_MODULE, 721 .owner = THIS_MODULE,
718 .name = "binfmt_misc", 722 .name = "binfmt_misc",
719 .get_sb = bm_get_sb, 723 .mount = bm_mount,
720 .kill_sb = kill_litter_super, 724 .kill_sb = kill_litter_super,
721}; 725};
722 726