diff options
author | David Howells <dhowells@redhat.com> | 2015-03-17 18:26:21 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-15 15:06:59 -0400 |
commit | bb668734c4c960c8f61f017585b323b97e5f47b5 (patch) | |
tree | e9c90394fb8342aeccd1b337c2e7949c5c843bec | |
parent | df2b1afde178f01c6a1b2ec285ca8bcfd4c66640 (diff) |
VFS: assorted d_backing_inode() annotations
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | arch/x86/kvm/assigned-dev.c | 2 | ||||
-rw-r--r-- | drivers/mtd/ubi/build.c | 6 | ||||
-rw-r--r-- | drivers/mtd/ubi/kapi.c | 2 | ||||
-rw-r--r-- | fs/block_dev.c | 2 | ||||
-rw-r--r-- | fs/posix_acl.c | 8 | ||||
-rw-r--r-- | fs/stat.c | 4 |
6 files changed, 12 insertions, 12 deletions
diff --git a/arch/x86/kvm/assigned-dev.c b/arch/x86/kvm/assigned-dev.c index 6eb5c20ee373..d090ecf08809 100644 --- a/arch/x86/kvm/assigned-dev.c +++ b/arch/x86/kvm/assigned-dev.c | |||
@@ -666,7 +666,7 @@ static int probe_sysfs_permissions(struct pci_dev *dev) | |||
666 | if (r) | 666 | if (r) |
667 | return r; | 667 | return r; |
668 | 668 | ||
669 | inode = path.dentry->d_inode; | 669 | inode = d_backing_inode(path.dentry); |
670 | 670 | ||
671 | r = inode_permission(inode, MAY_READ | MAY_WRITE | MAY_ACCESS); | 671 | r = inode_permission(inode, MAY_READ | MAY_WRITE | MAY_ACCESS); |
672 | path_put(&path); | 672 | path_put(&path); |
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index ba01a8d22d28..5f58635b8360 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c | |||
@@ -1164,9 +1164,9 @@ static struct mtd_info * __init open_mtd_by_chdev(const char *mtd_dev) | |||
1164 | return ERR_PTR(err); | 1164 | return ERR_PTR(err); |
1165 | 1165 | ||
1166 | /* MTD device number is defined by the major / minor numbers */ | 1166 | /* MTD device number is defined by the major / minor numbers */ |
1167 | major = imajor(path.dentry->d_inode); | 1167 | major = imajor(d_backing_inode(path.dentry)); |
1168 | minor = iminor(path.dentry->d_inode); | 1168 | minor = iminor(d_backing_inode(path.dentry)); |
1169 | mode = path.dentry->d_inode->i_mode; | 1169 | mode = d_backing_inode(path.dentry)->i_mode; |
1170 | path_put(&path); | 1170 | path_put(&path); |
1171 | if (major != MTD_CHAR_MAJOR || !S_ISCHR(mode)) | 1171 | if (major != MTD_CHAR_MAJOR || !S_ISCHR(mode)) |
1172 | return ERR_PTR(-EINVAL); | 1172 | return ERR_PTR(-EINVAL); |
diff --git a/drivers/mtd/ubi/kapi.c b/drivers/mtd/ubi/kapi.c index 478e00cf2d9e..e844887732fb 100644 --- a/drivers/mtd/ubi/kapi.c +++ b/drivers/mtd/ubi/kapi.c | |||
@@ -314,7 +314,7 @@ struct ubi_volume_desc *ubi_open_volume_path(const char *pathname, int mode) | |||
314 | if (error) | 314 | if (error) |
315 | return ERR_PTR(error); | 315 | return ERR_PTR(error); |
316 | 316 | ||
317 | inode = path.dentry->d_inode; | 317 | inode = d_backing_inode(path.dentry); |
318 | mod = inode->i_mode; | 318 | mod = inode->i_mode; |
319 | ubi_num = ubi_major2num(imajor(inode)); | 319 | ubi_num = ubi_major2num(imajor(inode)); |
320 | vol_id = iminor(inode) - 1; | 320 | vol_id = iminor(inode) - 1; |
diff --git a/fs/block_dev.c b/fs/block_dev.c index 897ee0503932..79b4fa3b391d 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -1716,7 +1716,7 @@ struct block_device *lookup_bdev(const char *pathname) | |||
1716 | if (error) | 1716 | if (error) |
1717 | return ERR_PTR(error); | 1717 | return ERR_PTR(error); |
1718 | 1718 | ||
1719 | inode = path.dentry->d_inode; | 1719 | inode = d_backing_inode(path.dentry); |
1720 | error = -ENOTBLK; | 1720 | error = -ENOTBLK; |
1721 | if (!S_ISBLK(inode->i_mode)) | 1721 | if (!S_ISBLK(inode->i_mode)) |
1722 | goto fail; | 1722 | goto fail; |
diff --git a/fs/posix_acl.c b/fs/posix_acl.c index 3a48bb789c9f..84bb65b83570 100644 --- a/fs/posix_acl.c +++ b/fs/posix_acl.c | |||
@@ -774,12 +774,12 @@ posix_acl_xattr_get(struct dentry *dentry, const char *name, | |||
774 | struct posix_acl *acl; | 774 | struct posix_acl *acl; |
775 | int error; | 775 | int error; |
776 | 776 | ||
777 | if (!IS_POSIXACL(dentry->d_inode)) | 777 | if (!IS_POSIXACL(d_backing_inode(dentry))) |
778 | return -EOPNOTSUPP; | 778 | return -EOPNOTSUPP; |
779 | if (d_is_symlink(dentry)) | 779 | if (d_is_symlink(dentry)) |
780 | return -EOPNOTSUPP; | 780 | return -EOPNOTSUPP; |
781 | 781 | ||
782 | acl = get_acl(dentry->d_inode, type); | 782 | acl = get_acl(d_backing_inode(dentry), type); |
783 | if (IS_ERR(acl)) | 783 | if (IS_ERR(acl)) |
784 | return PTR_ERR(acl); | 784 | return PTR_ERR(acl); |
785 | if (acl == NULL) | 785 | if (acl == NULL) |
@@ -795,7 +795,7 @@ static int | |||
795 | posix_acl_xattr_set(struct dentry *dentry, const char *name, | 795 | posix_acl_xattr_set(struct dentry *dentry, const char *name, |
796 | const void *value, size_t size, int flags, int type) | 796 | const void *value, size_t size, int flags, int type) |
797 | { | 797 | { |
798 | struct inode *inode = dentry->d_inode; | 798 | struct inode *inode = d_backing_inode(dentry); |
799 | struct posix_acl *acl = NULL; | 799 | struct posix_acl *acl = NULL; |
800 | int ret; | 800 | int ret; |
801 | 801 | ||
@@ -834,7 +834,7 @@ posix_acl_xattr_list(struct dentry *dentry, char *list, size_t list_size, | |||
834 | const char *xname; | 834 | const char *xname; |
835 | size_t size; | 835 | size_t size; |
836 | 836 | ||
837 | if (!IS_POSIXACL(dentry->d_inode)) | 837 | if (!IS_POSIXACL(d_backing_inode(dentry))) |
838 | return -EOPNOTSUPP; | 838 | return -EOPNOTSUPP; |
839 | if (d_is_symlink(dentry)) | 839 | if (d_is_symlink(dentry)) |
840 | return -EOPNOTSUPP; | 840 | return -EOPNOTSUPP; |
@@ -51,7 +51,7 @@ EXPORT_SYMBOL(generic_fillattr); | |||
51 | */ | 51 | */ |
52 | int vfs_getattr_nosec(struct path *path, struct kstat *stat) | 52 | int vfs_getattr_nosec(struct path *path, struct kstat *stat) |
53 | { | 53 | { |
54 | struct inode *inode = path->dentry->d_inode; | 54 | struct inode *inode = d_backing_inode(path->dentry); |
55 | 55 | ||
56 | if (inode->i_op->getattr) | 56 | if (inode->i_op->getattr) |
57 | return inode->i_op->getattr(path->mnt, path->dentry, stat); | 57 | return inode->i_op->getattr(path->mnt, path->dentry, stat); |
@@ -326,7 +326,7 @@ SYSCALL_DEFINE4(readlinkat, int, dfd, const char __user *, pathname, | |||
326 | retry: | 326 | retry: |
327 | error = user_path_at_empty(dfd, pathname, lookup_flags, &path, &empty); | 327 | error = user_path_at_empty(dfd, pathname, lookup_flags, &path, &empty); |
328 | if (!error) { | 328 | if (!error) { |
329 | struct inode *inode = path.dentry->d_inode; | 329 | struct inode *inode = d_backing_inode(path.dentry); |
330 | 330 | ||
331 | error = empty ? -ENOENT : -EINVAL; | 331 | error = empty ? -ENOENT : -EINVAL; |
332 | if (inode->i_op->readlink) { | 332 | if (inode->i_op->readlink) { |