aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-26 18:48:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-26 20:22:07 -0400
commit9ec3a646fe09970f801ab15e0f1694060b9f19af (patch)
tree697058ca7e1671eda180a3ccc62445686fbc1a31 /fs/xfs
parentc8b3fd0ce313443731e8fd6d5a541085eb465f99 (diff)
parent3cab989afd8d8d1bc3d99fef0e7ed87c31e7b647 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull fourth vfs update from Al Viro: "d_inode() annotations from David Howells (sat in for-next since before the beginning of merge window) + four assorted fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: RCU pathwalk breakage when running into a symlink overmounting something fix I_DIO_WAKEUP definition direct-io: only inc/dec inode->i_dio_count for file systems fs/9p: fix readdir() VFS: assorted d_backing_inode() annotations VFS: fs/inode.c helpers: d_inode() annotations VFS: fs/cachefiles: d_backing_inode() annotations VFS: fs library helpers: d_inode() annotations VFS: assorted weird filesystems: d_inode() annotations VFS: normal filesystems (and lustre): d_inode() annotations VFS: security/: d_inode() annotations VFS: security/: d_backing_inode() annotations VFS: net/: d_inode() annotations VFS: net/unix: d_backing_inode() annotations VFS: kernel/: d_inode() annotations VFS: audit: d_backing_inode() annotations VFS: Fix up some ->d_inode accesses in the chelsio driver VFS: Cachefiles should perform fs modifications on the top layer only VFS: AF_UNIX sockets should call mknod on the top layer only
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_export.c2
-rw-r--r--fs/xfs/xfs_filestream.c2
-rw-r--r--fs/xfs/xfs_ioctl.c18
-rw-r--r--fs/xfs/xfs_ioctl32.c12
-rw-r--r--fs/xfs/xfs_iops.c20
-rw-r--r--fs/xfs/xfs_super.c2
-rw-r--r--fs/xfs/xfs_xattr.c6
7 files changed, 31 insertions, 31 deletions
diff --git a/fs/xfs/xfs_export.c b/fs/xfs/xfs_export.c
index b97359ba2648..652cd3c5b58c 100644
--- a/fs/xfs/xfs_export.c
+++ b/fs/xfs/xfs_export.c
@@ -215,7 +215,7 @@ xfs_fs_get_parent(
215 int error; 215 int error;
216 struct xfs_inode *cip; 216 struct xfs_inode *cip;
217 217
218 error = xfs_lookup(XFS_I(child->d_inode), &xfs_name_dotdot, &cip, NULL); 218 error = xfs_lookup(XFS_I(d_inode(child)), &xfs_name_dotdot, &cip, NULL);
219 if (unlikely(error)) 219 if (unlikely(error))
220 return ERR_PTR(error); 220 return ERR_PTR(error);
221 221
diff --git a/fs/xfs/xfs_filestream.c b/fs/xfs/xfs_filestream.c
index 8f9f854376c6..da82f1cb4b9b 100644
--- a/fs/xfs/xfs_filestream.c
+++ b/fs/xfs/xfs_filestream.c
@@ -294,7 +294,7 @@ xfs_filestream_get_parent(
294 if (!parent) 294 if (!parent)
295 goto out_dput; 295 goto out_dput;
296 296
297 dir = igrab(parent->d_inode); 297 dir = igrab(d_inode(parent));
298 dput(parent); 298 dput(parent);
299 299
300out_dput: 300out_dput:
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index 5f4a396f5186..87f67c6b654c 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -82,7 +82,7 @@ xfs_find_handle(
82 error = user_lpath((const char __user *)hreq->path, &path); 82 error = user_lpath((const char __user *)hreq->path, &path);
83 if (error) 83 if (error)
84 return error; 84 return error;
85 inode = path.dentry->d_inode; 85 inode = d_inode(path.dentry);
86 } 86 }
87 ip = XFS_I(inode); 87 ip = XFS_I(inode);
88 88
@@ -210,7 +210,7 @@ xfs_open_by_handle(
210 dentry = xfs_handlereq_to_dentry(parfilp, hreq); 210 dentry = xfs_handlereq_to_dentry(parfilp, hreq);
211 if (IS_ERR(dentry)) 211 if (IS_ERR(dentry))
212 return PTR_ERR(dentry); 212 return PTR_ERR(dentry);
213 inode = dentry->d_inode; 213 inode = d_inode(dentry);
214 214
215 /* Restrict xfs_open_by_handle to directories & regular files. */ 215 /* Restrict xfs_open_by_handle to directories & regular files. */
216 if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode))) { 216 if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode))) {
@@ -303,7 +303,7 @@ xfs_readlink_by_handle(
303 goto out_dput; 303 goto out_dput;
304 } 304 }
305 305
306 error = xfs_readlink(XFS_I(dentry->d_inode), link); 306 error = xfs_readlink(XFS_I(d_inode(dentry)), link);
307 if (error) 307 if (error)
308 goto out_kfree; 308 goto out_kfree;
309 error = readlink_copy(hreq->ohandle, olen, link); 309 error = readlink_copy(hreq->ohandle, olen, link);
@@ -376,7 +376,7 @@ xfs_fssetdm_by_handle(
376 return PTR_ERR(dentry); 376 return PTR_ERR(dentry);
377 } 377 }
378 378
379 if (IS_IMMUTABLE(dentry->d_inode) || IS_APPEND(dentry->d_inode)) { 379 if (IS_IMMUTABLE(d_inode(dentry)) || IS_APPEND(d_inode(dentry))) {
380 error = -EPERM; 380 error = -EPERM;
381 goto out; 381 goto out;
382 } 382 }
@@ -386,7 +386,7 @@ xfs_fssetdm_by_handle(
386 goto out; 386 goto out;
387 } 387 }
388 388
389 error = xfs_set_dmattrs(XFS_I(dentry->d_inode), fsd.fsd_dmevmask, 389 error = xfs_set_dmattrs(XFS_I(d_inode(dentry)), fsd.fsd_dmevmask,
390 fsd.fsd_dmstate); 390 fsd.fsd_dmstate);
391 391
392 out: 392 out:
@@ -429,7 +429,7 @@ xfs_attrlist_by_handle(
429 goto out_dput; 429 goto out_dput;
430 430
431 cursor = (attrlist_cursor_kern_t *)&al_hreq.pos; 431 cursor = (attrlist_cursor_kern_t *)&al_hreq.pos;
432 error = xfs_attr_list(XFS_I(dentry->d_inode), kbuf, al_hreq.buflen, 432 error = xfs_attr_list(XFS_I(d_inode(dentry)), kbuf, al_hreq.buflen,
433 al_hreq.flags, cursor); 433 al_hreq.flags, cursor);
434 if (error) 434 if (error)
435 goto out_kfree; 435 goto out_kfree;
@@ -559,7 +559,7 @@ xfs_attrmulti_by_handle(
559 switch (ops[i].am_opcode) { 559 switch (ops[i].am_opcode) {
560 case ATTR_OP_GET: 560 case ATTR_OP_GET:
561 ops[i].am_error = xfs_attrmulti_attr_get( 561 ops[i].am_error = xfs_attrmulti_attr_get(
562 dentry->d_inode, attr_name, 562 d_inode(dentry), attr_name,
563 ops[i].am_attrvalue, &ops[i].am_length, 563 ops[i].am_attrvalue, &ops[i].am_length,
564 ops[i].am_flags); 564 ops[i].am_flags);
565 break; 565 break;
@@ -568,7 +568,7 @@ xfs_attrmulti_by_handle(
568 if (ops[i].am_error) 568 if (ops[i].am_error)
569 break; 569 break;
570 ops[i].am_error = xfs_attrmulti_attr_set( 570 ops[i].am_error = xfs_attrmulti_attr_set(
571 dentry->d_inode, attr_name, 571 d_inode(dentry), attr_name,
572 ops[i].am_attrvalue, ops[i].am_length, 572 ops[i].am_attrvalue, ops[i].am_length,
573 ops[i].am_flags); 573 ops[i].am_flags);
574 mnt_drop_write_file(parfilp); 574 mnt_drop_write_file(parfilp);
@@ -578,7 +578,7 @@ xfs_attrmulti_by_handle(
578 if (ops[i].am_error) 578 if (ops[i].am_error)
579 break; 579 break;
580 ops[i].am_error = xfs_attrmulti_attr_remove( 580 ops[i].am_error = xfs_attrmulti_attr_remove(
581 dentry->d_inode, attr_name, 581 d_inode(dentry), attr_name,
582 ops[i].am_flags); 582 ops[i].am_flags);
583 mnt_drop_write_file(parfilp); 583 mnt_drop_write_file(parfilp);
584 break; 584 break;
diff --git a/fs/xfs/xfs_ioctl32.c b/fs/xfs/xfs_ioctl32.c
index bfc7c7c8a0c8..b88bdc85dd3d 100644
--- a/fs/xfs/xfs_ioctl32.c
+++ b/fs/xfs/xfs_ioctl32.c
@@ -375,7 +375,7 @@ xfs_compat_attrlist_by_handle(
375 goto out_dput; 375 goto out_dput;
376 376
377 cursor = (attrlist_cursor_kern_t *)&al_hreq.pos; 377 cursor = (attrlist_cursor_kern_t *)&al_hreq.pos;
378 error = xfs_attr_list(XFS_I(dentry->d_inode), kbuf, al_hreq.buflen, 378 error = xfs_attr_list(XFS_I(d_inode(dentry)), kbuf, al_hreq.buflen,
379 al_hreq.flags, cursor); 379 al_hreq.flags, cursor);
380 if (error) 380 if (error)
381 goto out_kfree; 381 goto out_kfree;
@@ -445,7 +445,7 @@ xfs_compat_attrmulti_by_handle(
445 switch (ops[i].am_opcode) { 445 switch (ops[i].am_opcode) {
446 case ATTR_OP_GET: 446 case ATTR_OP_GET:
447 ops[i].am_error = xfs_attrmulti_attr_get( 447 ops[i].am_error = xfs_attrmulti_attr_get(
448 dentry->d_inode, attr_name, 448 d_inode(dentry), attr_name,
449 compat_ptr(ops[i].am_attrvalue), 449 compat_ptr(ops[i].am_attrvalue),
450 &ops[i].am_length, ops[i].am_flags); 450 &ops[i].am_length, ops[i].am_flags);
451 break; 451 break;
@@ -454,7 +454,7 @@ xfs_compat_attrmulti_by_handle(
454 if (ops[i].am_error) 454 if (ops[i].am_error)
455 break; 455 break;
456 ops[i].am_error = xfs_attrmulti_attr_set( 456 ops[i].am_error = xfs_attrmulti_attr_set(
457 dentry->d_inode, attr_name, 457 d_inode(dentry), attr_name,
458 compat_ptr(ops[i].am_attrvalue), 458 compat_ptr(ops[i].am_attrvalue),
459 ops[i].am_length, ops[i].am_flags); 459 ops[i].am_length, ops[i].am_flags);
460 mnt_drop_write_file(parfilp); 460 mnt_drop_write_file(parfilp);
@@ -464,7 +464,7 @@ xfs_compat_attrmulti_by_handle(
464 if (ops[i].am_error) 464 if (ops[i].am_error)
465 break; 465 break;
466 ops[i].am_error = xfs_attrmulti_attr_remove( 466 ops[i].am_error = xfs_attrmulti_attr_remove(
467 dentry->d_inode, attr_name, 467 d_inode(dentry), attr_name,
468 ops[i].am_flags); 468 ops[i].am_flags);
469 mnt_drop_write_file(parfilp); 469 mnt_drop_write_file(parfilp);
470 break; 470 break;
@@ -504,7 +504,7 @@ xfs_compat_fssetdm_by_handle(
504 if (IS_ERR(dentry)) 504 if (IS_ERR(dentry))
505 return PTR_ERR(dentry); 505 return PTR_ERR(dentry);
506 506
507 if (IS_IMMUTABLE(dentry->d_inode) || IS_APPEND(dentry->d_inode)) { 507 if (IS_IMMUTABLE(d_inode(dentry)) || IS_APPEND(d_inode(dentry))) {
508 error = -EPERM; 508 error = -EPERM;
509 goto out; 509 goto out;
510 } 510 }
@@ -514,7 +514,7 @@ xfs_compat_fssetdm_by_handle(
514 goto out; 514 goto out;
515 } 515 }
516 516
517 error = xfs_set_dmattrs(XFS_I(dentry->d_inode), fsd.fsd_dmevmask, 517 error = xfs_set_dmattrs(XFS_I(d_inode(dentry)), fsd.fsd_dmevmask,
518 fsd.fsd_dmstate); 518 fsd.fsd_dmstate);
519 519
520out: 520out:
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index 2f1839e4dd1b..f4cd7204e236 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
@@ -304,7 +304,7 @@ xfs_vn_link(
304 struct inode *dir, 304 struct inode *dir,
305 struct dentry *dentry) 305 struct dentry *dentry)
306{ 306{
307 struct inode *inode = old_dentry->d_inode; 307 struct inode *inode = d_inode(old_dentry);
308 struct xfs_name name; 308 struct xfs_name name;
309 int error; 309 int error;
310 310
@@ -329,7 +329,7 @@ xfs_vn_unlink(
329 329
330 xfs_dentry_to_name(&name, dentry, 0); 330 xfs_dentry_to_name(&name, dentry, 0);
331 331
332 error = xfs_remove(XFS_I(dir), &name, XFS_I(dentry->d_inode)); 332 error = xfs_remove(XFS_I(dir), &name, XFS_I(d_inode(dentry)));
333 if (error) 333 if (error)
334 return error; 334 return error;
335 335
@@ -389,7 +389,7 @@ xfs_vn_rename(
389 struct dentry *ndentry, 389 struct dentry *ndentry,
390 unsigned int flags) 390 unsigned int flags)
391{ 391{
392 struct inode *new_inode = ndentry->d_inode; 392 struct inode *new_inode = d_inode(ndentry);
393 int omode = 0; 393 int omode = 0;
394 struct xfs_name oname; 394 struct xfs_name oname;
395 struct xfs_name nname; 395 struct xfs_name nname;
@@ -399,12 +399,12 @@ xfs_vn_rename(
399 399
400 /* if we are exchanging files, we need to set i_mode of both files */ 400 /* if we are exchanging files, we need to set i_mode of both files */
401 if (flags & RENAME_EXCHANGE) 401 if (flags & RENAME_EXCHANGE)
402 omode = ndentry->d_inode->i_mode; 402 omode = d_inode(ndentry)->i_mode;
403 403
404 xfs_dentry_to_name(&oname, odentry, omode); 404 xfs_dentry_to_name(&oname, odentry, omode);
405 xfs_dentry_to_name(&nname, ndentry, odentry->d_inode->i_mode); 405 xfs_dentry_to_name(&nname, ndentry, d_inode(odentry)->i_mode);
406 406
407 return xfs_rename(XFS_I(odir), &oname, XFS_I(odentry->d_inode), 407 return xfs_rename(XFS_I(odir), &oname, XFS_I(d_inode(odentry)),
408 XFS_I(ndir), &nname, 408 XFS_I(ndir), &nname,
409 new_inode ? XFS_I(new_inode) : NULL, flags); 409 new_inode ? XFS_I(new_inode) : NULL, flags);
410} 410}
@@ -426,7 +426,7 @@ xfs_vn_follow_link(
426 if (!link) 426 if (!link)
427 goto out_err; 427 goto out_err;
428 428
429 error = xfs_readlink(XFS_I(dentry->d_inode), link); 429 error = xfs_readlink(XFS_I(d_inode(dentry)), link);
430 if (unlikely(error)) 430 if (unlikely(error))
431 goto out_kfree; 431 goto out_kfree;
432 432
@@ -446,7 +446,7 @@ xfs_vn_getattr(
446 struct dentry *dentry, 446 struct dentry *dentry,
447 struct kstat *stat) 447 struct kstat *stat)
448{ 448{
449 struct inode *inode = dentry->d_inode; 449 struct inode *inode = d_inode(dentry);
450 struct xfs_inode *ip = XFS_I(inode); 450 struct xfs_inode *ip = XFS_I(inode);
451 struct xfs_mount *mp = ip->i_mount; 451 struct xfs_mount *mp = ip->i_mount;
452 452
@@ -946,14 +946,14 @@ xfs_vn_setattr(
946 struct dentry *dentry, 946 struct dentry *dentry,
947 struct iattr *iattr) 947 struct iattr *iattr)
948{ 948{
949 struct xfs_inode *ip = XFS_I(dentry->d_inode); 949 struct xfs_inode *ip = XFS_I(d_inode(dentry));
950 int error; 950 int error;
951 951
952 if (iattr->ia_valid & ATTR_SIZE) { 952 if (iattr->ia_valid & ATTR_SIZE) {
953 uint iolock = XFS_IOLOCK_EXCL; 953 uint iolock = XFS_IOLOCK_EXCL;
954 954
955 xfs_ilock(ip, iolock); 955 xfs_ilock(ip, iolock);
956 error = xfs_break_layouts(dentry->d_inode, &iolock, true); 956 error = xfs_break_layouts(d_inode(dentry), &iolock, true);
957 if (!error) { 957 if (!error) {
958 xfs_ilock(ip, XFS_MMAPLOCK_EXCL); 958 xfs_ilock(ip, XFS_MMAPLOCK_EXCL);
959 iolock |= XFS_MMAPLOCK_EXCL; 959 iolock |= XFS_MMAPLOCK_EXCL;
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 5f357ca97e76..858e1e62bbaa 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1048,7 +1048,7 @@ xfs_fs_statfs(
1048{ 1048{
1049 struct xfs_mount *mp = XFS_M(dentry->d_sb); 1049 struct xfs_mount *mp = XFS_M(dentry->d_sb);
1050 xfs_sb_t *sbp = &mp->m_sb; 1050 xfs_sb_t *sbp = &mp->m_sb;
1051 struct xfs_inode *ip = XFS_I(dentry->d_inode); 1051 struct xfs_inode *ip = XFS_I(d_inode(dentry));
1052 __uint64_t fakeinos, id; 1052 __uint64_t fakeinos, id;
1053 __uint64_t icount; 1053 __uint64_t icount;
1054 __uint64_t ifree; 1054 __uint64_t ifree;
diff --git a/fs/xfs/xfs_xattr.c b/fs/xfs/xfs_xattr.c
index 69f6e475de97..c036815183cb 100644
--- a/fs/xfs/xfs_xattr.c
+++ b/fs/xfs/xfs_xattr.c
@@ -35,7 +35,7 @@ static int
35xfs_xattr_get(struct dentry *dentry, const char *name, 35xfs_xattr_get(struct dentry *dentry, const char *name,
36 void *value, size_t size, int xflags) 36 void *value, size_t size, int xflags)
37{ 37{
38 struct xfs_inode *ip = XFS_I(dentry->d_inode); 38 struct xfs_inode *ip = XFS_I(d_inode(dentry));
39 int error, asize = size; 39 int error, asize = size;
40 40
41 if (strcmp(name, "") == 0) 41 if (strcmp(name, "") == 0)
@@ -57,7 +57,7 @@ static int
57xfs_xattr_set(struct dentry *dentry, const char *name, const void *value, 57xfs_xattr_set(struct dentry *dentry, const char *name, const void *value,
58 size_t size, int flags, int xflags) 58 size_t size, int flags, int xflags)
59{ 59{
60 struct xfs_inode *ip = XFS_I(dentry->d_inode); 60 struct xfs_inode *ip = XFS_I(d_inode(dentry));
61 61
62 if (strcmp(name, "") == 0) 62 if (strcmp(name, "") == 0)
63 return -EINVAL; 63 return -EINVAL;
@@ -197,7 +197,7 @@ xfs_vn_listxattr(struct dentry *dentry, char *data, size_t size)
197{ 197{
198 struct xfs_attr_list_context context; 198 struct xfs_attr_list_context context;
199 struct attrlist_cursor_kern cursor = { 0 }; 199 struct attrlist_cursor_kern cursor = { 0 };
200 struct inode *inode = dentry->d_inode; 200 struct inode *inode = d_inode(dentry);
201 int error; 201 int error;
202 202
203 /* 203 /*