Merge tag 'v4.1-rockchip-socfixes2' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-block.git] / fs / hfs / attr.c
index e057ec542a6ad3634d6dd240f2dfcadc3fff7a43..8d931b157bbef8bfd382d9c6878fbdb8d53da481 100644 (file)
@@ -16,7 +16,7 @@
 int hfs_setxattr(struct dentry *dentry, const char *name,
                 const void *value, size_t size, int flags)
 {
-       struct inode *inode = dentry->d_inode;
+       struct inode *inode = d_inode(dentry);
        struct hfs_find_data fd;
        hfs_cat_rec rec;
        struct hfs_cat_file *file;
@@ -59,7 +59,7 @@ out:
 ssize_t hfs_getxattr(struct dentry *dentry, const char *name,
                         void *value, size_t size)
 {
-       struct inode *inode = dentry->d_inode;
+       struct inode *inode = d_inode(dentry);
        struct hfs_find_data fd;
        hfs_cat_rec rec;
        struct hfs_cat_file *file;
@@ -105,7 +105,7 @@ out:
 
 ssize_t hfs_listxattr(struct dentry *dentry, char *buffer, size_t size)
 {
-       struct inode *inode = dentry->d_inode;
+       struct inode *inode = d_inode(dentry);
 
        if (!S_ISREG(inode->i_mode) || HFS_IS_RSRC(inode))
                return -EOPNOTSUPP;