diff options
Diffstat (limited to 'fs/devpts/inode.c')
-rw-r--r-- | fs/devpts/inode.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index cfe8466f7fef..add566303c68 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c | |||
@@ -253,7 +253,7 @@ static int mknod_ptmx(struct super_block *sb) | |||
253 | if (!uid_valid(root_uid) || !gid_valid(root_gid)) | 253 | if (!uid_valid(root_uid) || !gid_valid(root_gid)) |
254 | return -EINVAL; | 254 | return -EINVAL; |
255 | 255 | ||
256 | mutex_lock(&root->d_inode->i_mutex); | 256 | mutex_lock(&d_inode(root)->i_mutex); |
257 | 257 | ||
258 | /* If we have already created ptmx node, return */ | 258 | /* If we have already created ptmx node, return */ |
259 | if (fsi->ptmx_dentry) { | 259 | if (fsi->ptmx_dentry) { |
@@ -290,7 +290,7 @@ static int mknod_ptmx(struct super_block *sb) | |||
290 | fsi->ptmx_dentry = dentry; | 290 | fsi->ptmx_dentry = dentry; |
291 | rc = 0; | 291 | rc = 0; |
292 | out: | 292 | out: |
293 | mutex_unlock(&root->d_inode->i_mutex); | 293 | mutex_unlock(&d_inode(root)->i_mutex); |
294 | return rc; | 294 | return rc; |
295 | } | 295 | } |
296 | 296 | ||
@@ -298,7 +298,7 @@ static void update_ptmx_mode(struct pts_fs_info *fsi) | |||
298 | { | 298 | { |
299 | struct inode *inode; | 299 | struct inode *inode; |
300 | if (fsi->ptmx_dentry) { | 300 | if (fsi->ptmx_dentry) { |
301 | inode = fsi->ptmx_dentry->d_inode; | 301 | inode = d_inode(fsi->ptmx_dentry); |
302 | inode->i_mode = S_IFCHR|fsi->mount_opts.ptmxmode; | 302 | inode->i_mode = S_IFCHR|fsi->mount_opts.ptmxmode; |
303 | } | 303 | } |
304 | } | 304 | } |
@@ -602,18 +602,18 @@ struct inode *devpts_pty_new(struct inode *ptmx_inode, dev_t device, int index, | |||
602 | 602 | ||
603 | sprintf(s, "%d", index); | 603 | sprintf(s, "%d", index); |
604 | 604 | ||
605 | mutex_lock(&root->d_inode->i_mutex); | 605 | mutex_lock(&d_inode(root)->i_mutex); |
606 | 606 | ||
607 | dentry = d_alloc_name(root, s); | 607 | dentry = d_alloc_name(root, s); |
608 | if (dentry) { | 608 | if (dentry) { |
609 | d_add(dentry, inode); | 609 | d_add(dentry, inode); |
610 | fsnotify_create(root->d_inode, dentry); | 610 | fsnotify_create(d_inode(root), dentry); |
611 | } else { | 611 | } else { |
612 | iput(inode); | 612 | iput(inode); |
613 | inode = ERR_PTR(-ENOMEM); | 613 | inode = ERR_PTR(-ENOMEM); |
614 | } | 614 | } |
615 | 615 | ||
616 | mutex_unlock(&root->d_inode->i_mutex); | 616 | mutex_unlock(&d_inode(root)->i_mutex); |
617 | 617 | ||
618 | return inode; | 618 | return inode; |
619 | } | 619 | } |
@@ -658,7 +658,7 @@ void devpts_pty_kill(struct inode *inode) | |||
658 | 658 | ||
659 | BUG_ON(inode->i_rdev == MKDEV(TTYAUX_MAJOR, PTMX_MINOR)); | 659 | BUG_ON(inode->i_rdev == MKDEV(TTYAUX_MAJOR, PTMX_MINOR)); |
660 | 660 | ||
661 | mutex_lock(&root->d_inode->i_mutex); | 661 | mutex_lock(&d_inode(root)->i_mutex); |
662 | 662 | ||
663 | dentry = d_find_alias(inode); | 663 | dentry = d_find_alias(inode); |
664 | 664 | ||
@@ -667,7 +667,7 @@ void devpts_pty_kill(struct inode *inode) | |||
667 | dput(dentry); /* d_alloc_name() in devpts_pty_new() */ | 667 | dput(dentry); /* d_alloc_name() in devpts_pty_new() */ |
668 | dput(dentry); /* d_find_alias above */ | 668 | dput(dentry); /* d_find_alias above */ |
669 | 669 | ||
670 | mutex_unlock(&root->d_inode->i_mutex); | 670 | mutex_unlock(&d_inode(root)->i_mutex); |
671 | } | 671 | } |
672 | 672 | ||
673 | static int __init init_devpts_fs(void) | 673 | static int __init init_devpts_fs(void) |