aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cachefiles/xattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cachefiles/xattr.c')
-rw-r--r--fs/cachefiles/xattr.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/cachefiles/xattr.c b/fs/cachefiles/xattr.c
index a8a68745e11d..d31c1a72d8a5 100644
--- a/fs/cachefiles/xattr.c
+++ b/fs/cachefiles/xattr.c
@@ -33,7 +33,7 @@ int cachefiles_check_object_type(struct cachefiles_object *object)
33 int ret; 33 int ret;
34 34
35 ASSERT(dentry); 35 ASSERT(dentry);
36 ASSERT(dentry->d_inode); 36 ASSERT(d_backing_inode(dentry));
37 37
38 if (!object->fscache.cookie) 38 if (!object->fscache.cookie)
39 strcpy(type, "C3"); 39 strcpy(type, "C3");
@@ -52,7 +52,7 @@ int cachefiles_check_object_type(struct cachefiles_object *object)
52 52
53 if (ret != -EEXIST) { 53 if (ret != -EEXIST) {
54 pr_err("Can't set xattr on %pd [%lu] (err %d)\n", 54 pr_err("Can't set xattr on %pd [%lu] (err %d)\n",
55 dentry, dentry->d_inode->i_ino, 55 dentry, d_backing_inode(dentry)->i_ino,
56 -ret); 56 -ret);
57 goto error; 57 goto error;
58 } 58 }
@@ -64,7 +64,7 @@ int cachefiles_check_object_type(struct cachefiles_object *object)
64 goto bad_type_length; 64 goto bad_type_length;
65 65
66 pr_err("Can't read xattr on %pd [%lu] (err %d)\n", 66 pr_err("Can't read xattr on %pd [%lu] (err %d)\n",
67 dentry, dentry->d_inode->i_ino, 67 dentry, d_backing_inode(dentry)->i_ino,
68 -ret); 68 -ret);
69 goto error; 69 goto error;
70 } 70 }
@@ -84,14 +84,14 @@ error:
84 84
85bad_type_length: 85bad_type_length:
86 pr_err("Cache object %lu type xattr length incorrect\n", 86 pr_err("Cache object %lu type xattr length incorrect\n",
87 dentry->d_inode->i_ino); 87 d_backing_inode(dentry)->i_ino);
88 ret = -EIO; 88 ret = -EIO;
89 goto error; 89 goto error;
90 90
91bad_type: 91bad_type:
92 xtype[2] = 0; 92 xtype[2] = 0;
93 pr_err("Cache object %pd [%lu] type %s not %s\n", 93 pr_err("Cache object %pd [%lu] type %s not %s\n",
94 dentry, dentry->d_inode->i_ino, 94 dentry, d_backing_inode(dentry)->i_ino,
95 xtype, type); 95 xtype, type);
96 ret = -EIO; 96 ret = -EIO;
97 goto error; 97 goto error;
@@ -165,7 +165,7 @@ int cachefiles_check_auxdata(struct cachefiles_object *object)
165 int ret; 165 int ret;
166 166
167 ASSERT(dentry); 167 ASSERT(dentry);
168 ASSERT(dentry->d_inode); 168 ASSERT(d_backing_inode(dentry));
169 ASSERT(object->fscache.cookie->def->check_aux); 169 ASSERT(object->fscache.cookie->def->check_aux);
170 170
171 auxbuf = kmalloc(sizeof(struct cachefiles_xattr) + 512, GFP_KERNEL); 171 auxbuf = kmalloc(sizeof(struct cachefiles_xattr) + 512, GFP_KERNEL);
@@ -204,7 +204,7 @@ int cachefiles_check_object_xattr(struct cachefiles_object *object,
204 _enter("%p,#%d", object, auxdata->len); 204 _enter("%p,#%d", object, auxdata->len);
205 205
206 ASSERT(dentry); 206 ASSERT(dentry);
207 ASSERT(dentry->d_inode); 207 ASSERT(d_backing_inode(dentry));
208 208
209 auxbuf = kmalloc(sizeof(struct cachefiles_xattr) + 512, cachefiles_gfp); 209 auxbuf = kmalloc(sizeof(struct cachefiles_xattr) + 512, cachefiles_gfp);
210 if (!auxbuf) { 210 if (!auxbuf) {
@@ -225,7 +225,7 @@ int cachefiles_check_object_xattr(struct cachefiles_object *object,
225 225
226 cachefiles_io_error_obj(object, 226 cachefiles_io_error_obj(object,
227 "Can't read xattr on %lu (err %d)", 227 "Can't read xattr on %lu (err %d)",
228 dentry->d_inode->i_ino, -ret); 228 d_backing_inode(dentry)->i_ino, -ret);
229 goto error; 229 goto error;
230 } 230 }
231 231
@@ -276,7 +276,7 @@ int cachefiles_check_object_xattr(struct cachefiles_object *object,
276 cachefiles_io_error_obj(object, 276 cachefiles_io_error_obj(object,
277 "Can't update xattr on %lu" 277 "Can't update xattr on %lu"
278 " (error %d)", 278 " (error %d)",
279 dentry->d_inode->i_ino, -ret); 279 d_backing_inode(dentry)->i_ino, -ret);
280 goto error; 280 goto error;
281 } 281 }
282 } 282 }
@@ -291,7 +291,7 @@ error:
291 291
292bad_type_length: 292bad_type_length:
293 pr_err("Cache object %lu xattr length incorrect\n", 293 pr_err("Cache object %lu xattr length incorrect\n",
294 dentry->d_inode->i_ino); 294 d_backing_inode(dentry)->i_ino);
295 ret = -EIO; 295 ret = -EIO;
296 goto error; 296 goto error;
297 297
@@ -316,7 +316,7 @@ int cachefiles_remove_object_xattr(struct cachefiles_cache *cache,
316 cachefiles_io_error(cache, 316 cachefiles_io_error(cache,
317 "Can't remove xattr from %lu" 317 "Can't remove xattr from %lu"
318 " (error %d)", 318 " (error %d)",
319 dentry->d_inode->i_ino, -ret); 319 d_backing_inode(dentry)->i_ino, -ret);
320 } 320 }
321 321
322 _leave(" = %d", ret); 322 _leave(" = %d", ret);