diff options
author | David Howells <dhowells@redhat.com> | 2015-03-17 22:26:12 +0000 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-15 15:06:58 -0400 |
commit | 75c3cfa855dcedc84e7964269c9b6baf26137959 (patch) | |
tree | 2ef6b8570069d7811542db376c88fbe208a5771d /fs/binfmt_misc.c | |
parent | 2b0143b5c986be1ce8408b3aadc4709e0a94429d (diff) | |
download | linux-rpi-75c3cfa855dcedc84e7964269c9b6baf26137959.tar.gz linux-rpi-75c3cfa855dcedc84e7964269c9b6baf26137959.tar.bz2 linux-rpi-75c3cfa855dcedc84e7964269c9b6baf26137959.zip |
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/binfmt_misc.c')
-rw-r--r-- | fs/binfmt_misc.c | 16 |
1 files changed, 8 insertions, 8 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) write_unlock(&entries_lock); if (dentry) { - drop_nlink(dentry->d_inode); + drop_nlink(d_inode(dentry)); d_drop(dentry); dput(dentry); simple_release_fs(&bm_mnt, &entry_count); @@ -650,11 +650,11 @@ static ssize_t bm_entry_write(struct file *file, const char __user *buffer, case 3: /* Delete this handler. */ root = dget(file->f_path.dentry->d_sb->s_root); - mutex_lock(&root->d_inode->i_mutex); + mutex_lock(&d_inode(root)->i_mutex); kill_node(e); - mutex_unlock(&root->d_inode->i_mutex); + mutex_unlock(&d_inode(root)->i_mutex); dput(root); break; default: @@ -687,14 +687,14 @@ static ssize_t bm_register_write(struct file *file, const char __user *buffer, return PTR_ERR(e); root = dget(sb->s_root); - mutex_lock(&root->d_inode->i_mutex); + mutex_lock(&d_inode(root)->i_mutex); dentry = lookup_one_len(e->name, root, strlen(e->name)); err = PTR_ERR(dentry); if (IS_ERR(dentry)) goto out; err = -EEXIST; - if (dentry->d_inode) + if (d_really_is_positive(dentry)) goto out2; 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, out2: dput(dentry); out: - mutex_unlock(&root->d_inode->i_mutex); + mutex_unlock(&d_inode(root)->i_mutex); dput(root); if (err) { @@ -766,12 +766,12 @@ static ssize_t bm_status_write(struct file *file, const char __user *buffer, case 3: /* Delete all handlers. */ root = dget(file->f_path.dentry->d_sb->s_root); - mutex_lock(&root->d_inode->i_mutex); + mutex_lock(&d_inode(root)->i_mutex); while (!list_empty(&entries)) kill_node(list_entry(entries.next, Node, list)); - mutex_unlock(&root->d_inode->i_mutex); + mutex_unlock(&d_inode(root)->i_mutex); dput(root); break; default: |