]> git.baikalelectronics.ru Git - kernel.git/commitdiff
VFS: assorted d_backing_inode() annotations
authorDavid Howells <dhowells@redhat.com>
Tue, 17 Mar 2015 22:26:21 +0000 (22:26 +0000)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 15 Apr 2015 19:06:59 +0000 (15:06 -0400)
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/x86/kvm/assigned-dev.c
drivers/mtd/ubi/build.c
drivers/mtd/ubi/kapi.c
fs/block_dev.c
fs/posix_acl.c
fs/stat.c

index 6eb5c20ee3739855a5d3fe52aa9a253b677552fd..d090ecf088097f4f845fc20d7d1bdd0a5849e712 100644 (file)
@@ -666,7 +666,7 @@ static int probe_sysfs_permissions(struct pci_dev *dev)
                if (r)
                        return r;
 
-               inode = path.dentry->d_inode;
+               inode = d_backing_inode(path.dentry);
 
                r = inode_permission(inode, MAY_READ | MAY_WRITE | MAY_ACCESS);
                path_put(&path);
index ba01a8d22d28bb7eb42d48f7da64b3b01da32f29..5f58635b8360eeade1511eba1385bf43431f87a5 100644 (file)
@@ -1164,9 +1164,9 @@ static struct mtd_info * __init open_mtd_by_chdev(const char *mtd_dev)
                return ERR_PTR(err);
 
        /* MTD device number is defined by the major / minor numbers */
-       major = imajor(path.dentry->d_inode);
-       minor = iminor(path.dentry->d_inode);
-       mode = path.dentry->d_inode->i_mode;
+       major = imajor(d_backing_inode(path.dentry));
+       minor = iminor(d_backing_inode(path.dentry));
+       mode = d_backing_inode(path.dentry)->i_mode;
        path_put(&path);
        if (major != MTD_CHAR_MAJOR || !S_ISCHR(mode))
                return ERR_PTR(-EINVAL);
index 478e00cf2d9e51b41af0ace4ea496c2ff31f0a79..e844887732fbd062481cc60a3a34a13dd7c25468 100644 (file)
@@ -314,7 +314,7 @@ struct ubi_volume_desc *ubi_open_volume_path(const char *pathname, int mode)
        if (error)
                return ERR_PTR(error);
 
-       inode = path.dentry->d_inode;
+       inode = d_backing_inode(path.dentry);
        mod = inode->i_mode;
        ubi_num = ubi_major2num(imajor(inode));
        vol_id = iminor(inode) - 1;
index 897ee0503932fbbf7adc88b0fd27591576696160..79b4fa3b391d221b08ffd66a853109901c1cfd3f 100644 (file)
@@ -1716,7 +1716,7 @@ struct block_device *lookup_bdev(const char *pathname)
        if (error)
                return ERR_PTR(error);
 
-       inode = path.dentry->d_inode;
+       inode = d_backing_inode(path.dentry);
        error = -ENOTBLK;
        if (!S_ISBLK(inode->i_mode))
                goto fail;
index 3a48bb789c9f3e4eb227214f72798b90c52af5dc..84bb65b835701365126833a9e74d9e5d7a8a6c00 100644 (file)
@@ -774,12 +774,12 @@ posix_acl_xattr_get(struct dentry *dentry, const char *name,
        struct posix_acl *acl;
        int error;
 
-       if (!IS_POSIXACL(dentry->d_inode))
+       if (!IS_POSIXACL(d_backing_inode(dentry)))
                return -EOPNOTSUPP;
        if (d_is_symlink(dentry))
                return -EOPNOTSUPP;
 
-       acl = get_acl(dentry->d_inode, type);
+       acl = get_acl(d_backing_inode(dentry), type);
        if (IS_ERR(acl))
                return PTR_ERR(acl);
        if (acl == NULL)
@@ -795,7 +795,7 @@ static int
 posix_acl_xattr_set(struct dentry *dentry, const char *name,
                const void *value, size_t size, int flags, int type)
 {
-       struct inode *inode = dentry->d_inode;
+       struct inode *inode = d_backing_inode(dentry);
        struct posix_acl *acl = NULL;
        int ret;
 
@@ -834,7 +834,7 @@ posix_acl_xattr_list(struct dentry *dentry, char *list, size_t list_size,
        const char *xname;
        size_t size;
 
-       if (!IS_POSIXACL(dentry->d_inode))
+       if (!IS_POSIXACL(d_backing_inode(dentry)))
                return -EOPNOTSUPP;
        if (d_is_symlink(dentry))
                return -EOPNOTSUPP;
index 19636af5e75cc16614f790519c6111599d906830..cccc1aab9a8b75231f056a18b0b9fc3ecaaf1561 100644 (file)
--- a/fs/stat.c
+++ b/fs/stat.c
@@ -51,7 +51,7 @@ EXPORT_SYMBOL(generic_fillattr);
  */
 int vfs_getattr_nosec(struct path *path, struct kstat *stat)
 {
-       struct inode *inode = path->dentry->d_inode;
+       struct inode *inode = d_backing_inode(path->dentry);
 
        if (inode->i_op->getattr)
                return inode->i_op->getattr(path->mnt, path->dentry, stat);
@@ -326,7 +326,7 @@ SYSCALL_DEFINE4(readlinkat, int, dfd, const char __user *, pathname,
 retry:
        error = user_path_at_empty(dfd, pathname, lookup_flags, &path, &empty);
        if (!error) {
-               struct inode *inode = path.dentry->d_inode;
+               struct inode *inode = d_backing_inode(path.dentry);
 
                error = empty ? -ENOENT : -EINVAL;
                if (inode->i_op->readlink) {