diff options
author | David Howells <dhowells@redhat.com> | 2015-03-17 18:26:12 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-15 15:06:58 -0400 |
commit | 75c3cfa855dcedc84e7964269c9b6baf26137959 (patch) | |
tree | 2ef6b8570069d7811542db376c88fbe208a5771d /fs | |
parent | 2b0143b5c986be1ce8408b3aadc4709e0a94429d (diff) |
VFS: assorted weird filesystems: d_inode() annotations
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/binfmt_misc.c | 16 | ||||
-rw-r--r-- | fs/nsfs.c | 4 | ||||
-rw-r--r-- | fs/pipe.c | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index 97aff2879cda..71a93012a182 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c | |||
@@ -603,7 +603,7 @@ static void kill_node(Node *e) | |||
603 | write_unlock(&entries_lock); | 603 | write_unlock(&entries_lock); |
604 | 604 | ||
605 | if (dentry) { | 605 | if (dentry) { |
606 | drop_nlink(dentry->d_inode); | 606 | drop_nlink(d_inode(dentry)); |
607 | d_drop(dentry); | 607 | d_drop(dentry); |
608 | dput(dentry); | 608 | dput(dentry); |
609 | simple_release_fs(&bm_mnt, &entry_count); | 609 | simple_release_fs(&bm_mnt, &entry_count); |
@@ -650,11 +650,11 @@ static ssize_t bm_entry_write(struct file *file, const char __user *buffer, | |||
650 | case 3: | 650 | case 3: |
651 | /* Delete this handler. */ | 651 | /* Delete this handler. */ |
652 | root = dget(file->f_path.dentry->d_sb->s_root); | 652 | root = dget(file->f_path.dentry->d_sb->s_root); |
653 | mutex_lock(&root->d_inode->i_mutex); | 653 | mutex_lock(&d_inode(root)->i_mutex); |
654 | 654 | ||
655 | kill_node(e); | 655 | kill_node(e); |
656 | 656 | ||
657 | mutex_unlock(&root->d_inode->i_mutex); | 657 | mutex_unlock(&d_inode(root)->i_mutex); |
658 | dput(root); | 658 | dput(root); |
659 | break; | 659 | break; |
660 | default: | 660 | default: |
@@ -687,14 +687,14 @@ static ssize_t bm_register_write(struct file *file, const char __user *buffer, | |||
687 | return PTR_ERR(e); | 687 | return PTR_ERR(e); |
688 | 688 | ||
689 | root = dget(sb->s_root); | 689 | root = dget(sb->s_root); |
690 | mutex_lock(&root->d_inode->i_mutex); | 690 | mutex_lock(&d_inode(root)->i_mutex); |
691 | dentry = lookup_one_len(e->name, root, strlen(e->name)); | 691 | dentry = lookup_one_len(e->name, root, strlen(e->name)); |
692 | err = PTR_ERR(dentry); | 692 | err = PTR_ERR(dentry); |
693 | if (IS_ERR(dentry)) | 693 | if (IS_ERR(dentry)) |
694 | goto out; | 694 | goto out; |
695 | 695 | ||
696 | err = -EEXIST; | 696 | err = -EEXIST; |
697 | if (dentry->d_inode) | 697 | if (d_really_is_positive(dentry)) |
698 | goto out2; | 698 | goto out2; |
699 | 699 | ||
700 | inode = bm_get_inode(sb, S_IFREG | 0644); | 700 | inode = bm_get_inode(sb, S_IFREG | 0644); |
@@ -723,7 +723,7 @@ static ssize_t bm_register_write(struct file *file, const char __user *buffer, | |||
723 | out2: | 723 | out2: |
724 | dput(dentry); | 724 | dput(dentry); |
725 | out: | 725 | out: |
726 | mutex_unlock(&root->d_inode->i_mutex); | 726 | mutex_unlock(&d_inode(root)->i_mutex); |
727 | dput(root); | 727 | dput(root); |
728 | 728 | ||
729 | if (err) { | 729 | if (err) { |
@@ -766,12 +766,12 @@ static ssize_t bm_status_write(struct file *file, const char __user *buffer, | |||
766 | case 3: | 766 | case 3: |
767 | /* Delete all handlers. */ | 767 | /* Delete all handlers. */ |
768 | root = dget(file->f_path.dentry->d_sb->s_root); | 768 | root = dget(file->f_path.dentry->d_sb->s_root); |
769 | mutex_lock(&root->d_inode->i_mutex); | 769 | mutex_lock(&d_inode(root)->i_mutex); |
770 | 770 | ||
771 | while (!list_empty(&entries)) | 771 | while (!list_empty(&entries)) |
772 | kill_node(list_entry(entries.next, Node, list)); | 772 | kill_node(list_entry(entries.next, Node, list)); |
773 | 773 | ||
774 | mutex_unlock(&root->d_inode->i_mutex); | 774 | mutex_unlock(&d_inode(root)->i_mutex); |
775 | dput(root); | 775 | dput(root); |
776 | break; | 776 | break; |
777 | default: | 777 | default: |
@@ -13,7 +13,7 @@ static const struct file_operations ns_file_operations = { | |||
13 | 13 | ||
14 | static char *ns_dname(struct dentry *dentry, char *buffer, int buflen) | 14 | static char *ns_dname(struct dentry *dentry, char *buffer, int buflen) |
15 | { | 15 | { |
16 | struct inode *inode = dentry->d_inode; | 16 | struct inode *inode = d_inode(dentry); |
17 | const struct proc_ns_operations *ns_ops = dentry->d_fsdata; | 17 | const struct proc_ns_operations *ns_ops = dentry->d_fsdata; |
18 | 18 | ||
19 | return dynamic_dname(dentry, buffer, buflen, "%s:[%lu]", | 19 | return dynamic_dname(dentry, buffer, buflen, "%s:[%lu]", |
@@ -22,7 +22,7 @@ static char *ns_dname(struct dentry *dentry, char *buffer, int buflen) | |||
22 | 22 | ||
23 | static void ns_prune_dentry(struct dentry *dentry) | 23 | static void ns_prune_dentry(struct dentry *dentry) |
24 | { | 24 | { |
25 | struct inode *inode = dentry->d_inode; | 25 | struct inode *inode = d_inode(dentry); |
26 | if (inode) { | 26 | if (inode) { |
27 | struct ns_common *ns = inode->i_private; | 27 | struct ns_common *ns = inode->i_private; |
28 | atomic_long_set(&ns->stashed, 0); | 28 | atomic_long_set(&ns->stashed, 0); |
@@ -627,7 +627,7 @@ static struct vfsmount *pipe_mnt __read_mostly; | |||
627 | static char *pipefs_dname(struct dentry *dentry, char *buffer, int buflen) | 627 | static char *pipefs_dname(struct dentry *dentry, char *buffer, int buflen) |
628 | { | 628 | { |
629 | return dynamic_dname(dentry, buffer, buflen, "pipe:[%lu]", | 629 | return dynamic_dname(dentry, buffer, buflen, "pipe:[%lu]", |
630 | dentry->d_inode->i_ino); | 630 | d_inode(dentry)->i_ino); |
631 | } | 631 | } |
632 | 632 | ||
633 | static const struct dentry_operations pipefs_dentry_operations = { | 633 | static const struct dentry_operations pipefs_dentry_operations = { |