aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/linux-2.6/xfs_file.c13
-rw-r--r--fs/xfs/linux-2.6/xfs_lrw.c14
-rw-r--r--fs/xfs/xfs_bmap.c2
-rw-r--r--fs/xfs/xfs_mount.h22
-rw-r--r--fs/xfs/xfs_rename.c8
-rw-r--r--fs/xfs/xfs_vfsops.c4
-rw-r--r--fs/xfs/xfs_vnodeops.c55
7 files changed, 54 insertions, 64 deletions
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c
index edab1ffbb163..05905246434d 100644
--- a/fs/xfs/linux-2.6/xfs_file.c
+++ b/fs/xfs/linux-2.6/xfs_file.c
@@ -469,16 +469,11 @@ xfs_file_open_exec(
469 struct inode *inode) 469 struct inode *inode)
470{ 470{
471 struct xfs_mount *mp = XFS_M(inode->i_sb); 471 struct xfs_mount *mp = XFS_M(inode->i_sb);
472 struct xfs_inode *ip = XFS_I(inode);
472 473
473 if (unlikely(mp->m_flags & XFS_MOUNT_DMAPI)) { 474 if (unlikely(mp->m_flags & XFS_MOUNT_DMAPI) &&
474 if (DM_EVENT_ENABLED(XFS_I(inode), DM_EVENT_READ)) { 475 DM_EVENT_ENABLED(ip, DM_EVENT_READ))
475 bhv_vnode_t *vp = vn_from_inode(inode); 476 return -XFS_SEND_DATA(mp, DM_EVENT_READ, ip, 0, 0, 0, NULL);
476
477 return -XFS_SEND_DATA(mp, DM_EVENT_READ,
478 vp, 0, 0, 0, NULL);
479 }
480 }
481
482 return 0; 477 return 0;
483} 478}
484#endif /* HAVE_FOP_OPEN_EXEC */ 479#endif /* HAVE_FOP_OPEN_EXEC */
diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c
index 3c20007ab48f..01a8f26e1b17 100644
--- a/fs/xfs/linux-2.6/xfs_lrw.c
+++ b/fs/xfs/linux-2.6/xfs_lrw.c
@@ -231,7 +231,7 @@ xfs_read(
231 int dmflags = FILP_DELAY_FLAG(file) | DM_SEM_FLAG_RD(ioflags); 231 int dmflags = FILP_DELAY_FLAG(file) | DM_SEM_FLAG_RD(ioflags);
232 int iolock = XFS_IOLOCK_SHARED; 232 int iolock = XFS_IOLOCK_SHARED;
233 233
234 ret = -XFS_SEND_DATA(mp, DM_EVENT_READ, vp, *offset, size, 234 ret = -XFS_SEND_DATA(mp, DM_EVENT_READ, ip, *offset, size,
235 dmflags, &iolock); 235 dmflags, &iolock);
236 if (ret) { 236 if (ret) {
237 xfs_iunlock(ip, XFS_IOLOCK_SHARED); 237 xfs_iunlock(ip, XFS_IOLOCK_SHARED);
@@ -276,7 +276,6 @@ xfs_splice_read(
276 int flags, 276 int flags,
277 int ioflags) 277 int ioflags)
278{ 278{
279 bhv_vnode_t *vp = XFS_ITOV(ip);
280 xfs_mount_t *mp = ip->i_mount; 279 xfs_mount_t *mp = ip->i_mount;
281 ssize_t ret; 280 ssize_t ret;
282 281
@@ -290,7 +289,7 @@ xfs_splice_read(
290 int iolock = XFS_IOLOCK_SHARED; 289 int iolock = XFS_IOLOCK_SHARED;
291 int error; 290 int error;
292 291
293 error = XFS_SEND_DATA(mp, DM_EVENT_READ, vp, *ppos, count, 292 error = XFS_SEND_DATA(mp, DM_EVENT_READ, ip, *ppos, count,
294 FILP_DELAY_FLAG(infilp), &iolock); 293 FILP_DELAY_FLAG(infilp), &iolock);
295 if (error) { 294 if (error) {
296 xfs_iunlock(ip, XFS_IOLOCK_SHARED); 295 xfs_iunlock(ip, XFS_IOLOCK_SHARED);
@@ -317,7 +316,6 @@ xfs_splice_write(
317 int flags, 316 int flags,
318 int ioflags) 317 int ioflags)
319{ 318{
320 bhv_vnode_t *vp = XFS_ITOV(ip);
321 xfs_mount_t *mp = ip->i_mount; 319 xfs_mount_t *mp = ip->i_mount;
322 ssize_t ret; 320 ssize_t ret;
323 struct inode *inode = outfilp->f_mapping->host; 321 struct inode *inode = outfilp->f_mapping->host;
@@ -333,7 +331,7 @@ xfs_splice_write(
333 int iolock = XFS_IOLOCK_EXCL; 331 int iolock = XFS_IOLOCK_EXCL;
334 int error; 332 int error;
335 333
336 error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, vp, *ppos, count, 334 error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, ip, *ppos, count,
337 FILP_DELAY_FLAG(outfilp), &iolock); 335 FILP_DELAY_FLAG(outfilp), &iolock);
338 if (error) { 336 if (error) {
339 xfs_iunlock(ip, XFS_IOLOCK_EXCL); 337 xfs_iunlock(ip, XFS_IOLOCK_EXCL);
@@ -631,7 +629,7 @@ start:
631 dmflags |= DM_FLAGS_IMUX; 629 dmflags |= DM_FLAGS_IMUX;
632 630
633 xfs_iunlock(xip, XFS_ILOCK_EXCL); 631 xfs_iunlock(xip, XFS_ILOCK_EXCL);
634 error = XFS_SEND_DATA(xip->i_mount, DM_EVENT_WRITE, vp, 632 error = XFS_SEND_DATA(xip->i_mount, DM_EVENT_WRITE, xip,
635 pos, count, dmflags, &iolock); 633 pos, count, dmflags, &iolock);
636 if (error) { 634 if (error) {
637 goto out_unlock_internal; 635 goto out_unlock_internal;
@@ -778,8 +776,8 @@ retry:
778 xfs_iunlock(xip, iolock); 776 xfs_iunlock(xip, iolock);
779 if (need_i_mutex) 777 if (need_i_mutex)
780 mutex_unlock(&inode->i_mutex); 778 mutex_unlock(&inode->i_mutex);
781 error = XFS_SEND_NAMESP(xip->i_mount, DM_EVENT_NOSPACE, vp, 779 error = XFS_SEND_NAMESP(xip->i_mount, DM_EVENT_NOSPACE, xip,
782 DM_RIGHT_NULL, vp, DM_RIGHT_NULL, NULL, NULL, 780 DM_RIGHT_NULL, xip, DM_RIGHT_NULL, NULL, NULL,
783 0, 0, 0); /* Delay flag intentionally unused */ 781 0, 0, 0); /* Delay flag intentionally unused */
784 if (need_i_mutex) 782 if (need_i_mutex)
785 mutex_lock(&inode->i_mutex); 783 mutex_lock(&inode->i_mutex);
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index 87f646749817..19aae13b7f95 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -5811,7 +5811,7 @@ xfs_getbmap(
5811 if ((interface & BMV_IF_NO_DMAPI_READ) == 0 && 5811 if ((interface & BMV_IF_NO_DMAPI_READ) == 0 &&
5812 DM_EVENT_ENABLED(ip, DM_EVENT_READ) && 5812 DM_EVENT_ENABLED(ip, DM_EVENT_READ) &&
5813 whichfork == XFS_DATA_FORK) { 5813 whichfork == XFS_DATA_FORK) {
5814 error = XFS_SEND_DATA(mp, DM_EVENT_READ, vp, 0, 0, 0, NULL); 5814 error = XFS_SEND_DATA(mp, DM_EVENT_READ, ip, 0, 0, 0, NULL);
5815 if (error) 5815 if (error)
5816 return XFS_ERROR(error); 5816 return XFS_ERROR(error);
5817 } 5817 }
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index 110ee83fcbec..7b37fa009297 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -66,17 +66,17 @@ struct xfs_mru_cache;
66 * Prototypes and functions for the Data Migration subsystem. 66 * Prototypes and functions for the Data Migration subsystem.
67 */ 67 */
68 68
69typedef int (*xfs_send_data_t)(int, bhv_vnode_t *, 69typedef int (*xfs_send_data_t)(int, struct xfs_inode *,
70 xfs_off_t, size_t, int, int *); 70 xfs_off_t, size_t, int, int *);
71typedef int (*xfs_send_mmap_t)(struct vm_area_struct *, uint); 71typedef int (*xfs_send_mmap_t)(struct vm_area_struct *, uint);
72typedef int (*xfs_send_destroy_t)(bhv_vnode_t *, dm_right_t); 72typedef int (*xfs_send_destroy_t)(struct xfs_inode *, dm_right_t);
73typedef int (*xfs_send_namesp_t)(dm_eventtype_t, struct xfs_mount *, 73typedef int (*xfs_send_namesp_t)(dm_eventtype_t, struct xfs_mount *,
74 bhv_vnode_t *, 74 struct xfs_inode *, dm_right_t,
75 dm_right_t, bhv_vnode_t *, dm_right_t, 75 struct xfs_inode *, dm_right_t,
76 char *, char *, mode_t, int, int); 76 char *, char *, mode_t, int, int);
77typedef int (*xfs_send_mount_t)(struct xfs_mount *, dm_right_t, 77typedef int (*xfs_send_mount_t)(struct xfs_mount *, dm_right_t,
78 char *, char *); 78 char *, char *);
79typedef void (*xfs_send_unmount_t)(struct xfs_mount *, bhv_vnode_t *, 79typedef void (*xfs_send_unmount_t)(struct xfs_mount *, struct xfs_inode *,
80 dm_right_t, mode_t, int, int); 80 dm_right_t, mode_t, int, int);
81 81
82typedef struct xfs_dmops { 82typedef struct xfs_dmops {
@@ -88,20 +88,20 @@ typedef struct xfs_dmops {
88 xfs_send_unmount_t xfs_send_unmount; 88 xfs_send_unmount_t xfs_send_unmount;
89} xfs_dmops_t; 89} xfs_dmops_t;
90 90
91#define XFS_SEND_DATA(mp, ev,vp,off,len,fl,lock) \ 91#define XFS_SEND_DATA(mp, ev,ip,off,len,fl,lock) \
92 (*(mp)->m_dm_ops->xfs_send_data)(ev,vp,off,len,fl,lock) 92 (*(mp)->m_dm_ops->xfs_send_data)(ev,ip,off,len,fl,lock)
93#define XFS_SEND_MMAP(mp, vma,fl) \ 93#define XFS_SEND_MMAP(mp, vma,fl) \
94 (*(mp)->m_dm_ops->xfs_send_mmap)(vma,fl) 94 (*(mp)->m_dm_ops->xfs_send_mmap)(vma,fl)
95#define XFS_SEND_DESTROY(mp, vp,right) \ 95#define XFS_SEND_DESTROY(mp, ip,right) \
96 (*(mp)->m_dm_ops->xfs_send_destroy)(vp,right) 96 (*(mp)->m_dm_ops->xfs_send_destroy)(ip,right)
97#define XFS_SEND_NAMESP(mp, ev,b1,r1,b2,r2,n1,n2,mode,rval,fl) \ 97#define XFS_SEND_NAMESP(mp, ev,b1,r1,b2,r2,n1,n2,mode,rval,fl) \
98 (*(mp)->m_dm_ops->xfs_send_namesp)(ev,NULL,b1,r1,b2,r2,n1,n2,mode,rval,fl) 98 (*(mp)->m_dm_ops->xfs_send_namesp)(ev,NULL,b1,r1,b2,r2,n1,n2,mode,rval,fl)
99#define XFS_SEND_PREUNMOUNT(mp,b1,r1,b2,r2,n1,n2,mode,rval,fl) \ 99#define XFS_SEND_PREUNMOUNT(mp,b1,r1,b2,r2,n1,n2,mode,rval,fl) \
100 (*(mp)->m_dm_ops->xfs_send_namesp)(DM_EVENT_PREUNMOUNT,mp,b1,r1,b2,r2,n1,n2,mode,rval,fl) 100 (*(mp)->m_dm_ops->xfs_send_namesp)(DM_EVENT_PREUNMOUNT,mp,b1,r1,b2,r2,n1,n2,mode,rval,fl)
101#define XFS_SEND_MOUNT(mp,right,path,name) \ 101#define XFS_SEND_MOUNT(mp,right,path,name) \
102 (*(mp)->m_dm_ops->xfs_send_mount)(mp,right,path,name) 102 (*(mp)->m_dm_ops->xfs_send_mount)(mp,right,path,name)
103#define XFS_SEND_UNMOUNT(mp, vp,right,mode,rval,fl) \ 103#define XFS_SEND_UNMOUNT(mp, ip,right,mode,rval,fl) \
104 (*(mp)->m_dm_ops->xfs_send_unmount)(mp,vp,right,mode,rval,fl) 104 (*(mp)->m_dm_ops->xfs_send_unmount)(mp,ip,right,mode,rval,fl)
105 105
106 106
107/* 107/*
diff --git a/fs/xfs/xfs_rename.c b/fs/xfs/xfs_rename.c
index fd1244cf50a7..6f80cfdfbd88 100644
--- a/fs/xfs/xfs_rename.c
+++ b/fs/xfs/xfs_rename.c
@@ -258,8 +258,8 @@ xfs_rename(
258 if (DM_EVENT_ENABLED(src_dp, DM_EVENT_RENAME) || 258 if (DM_EVENT_ENABLED(src_dp, DM_EVENT_RENAME) ||
259 DM_EVENT_ENABLED(target_dp, DM_EVENT_RENAME)) { 259 DM_EVENT_ENABLED(target_dp, DM_EVENT_RENAME)) {
260 error = XFS_SEND_NAMESP(mp, DM_EVENT_RENAME, 260 error = XFS_SEND_NAMESP(mp, DM_EVENT_RENAME,
261 src_dir_vp, DM_RIGHT_NULL, 261 src_dp, DM_RIGHT_NULL,
262 target_dir_vp, DM_RIGHT_NULL, 262 target_dp, DM_RIGHT_NULL,
263 src_name, target_name, 263 src_name, target_name,
264 0, 0, 0); 264 0, 0, 0);
265 if (error) { 265 if (error) {
@@ -591,8 +591,8 @@ std_return:
591 if (DM_EVENT_ENABLED(src_dp, DM_EVENT_POSTRENAME) || 591 if (DM_EVENT_ENABLED(src_dp, DM_EVENT_POSTRENAME) ||
592 DM_EVENT_ENABLED(target_dp, DM_EVENT_POSTRENAME)) { 592 DM_EVENT_ENABLED(target_dp, DM_EVENT_POSTRENAME)) {
593 (void) XFS_SEND_NAMESP (mp, DM_EVENT_POSTRENAME, 593 (void) XFS_SEND_NAMESP (mp, DM_EVENT_POSTRENAME,
594 src_dir_vp, DM_RIGHT_NULL, 594 src_dp, DM_RIGHT_NULL,
595 target_dir_vp, DM_RIGHT_NULL, 595 target_dp, DM_RIGHT_NULL,
596 src_name, target_name, 596 src_name, target_name,
597 0, error, 0); 597 0, error, 0);
598 } 598 }
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index 3ec27bf8531c..4c132a87d437 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -566,7 +566,7 @@ xfs_unmount(
566#ifdef HAVE_DMAPI 566#ifdef HAVE_DMAPI
567 if (mp->m_flags & XFS_MOUNT_DMAPI) { 567 if (mp->m_flags & XFS_MOUNT_DMAPI) {
568 error = XFS_SEND_PREUNMOUNT(mp, 568 error = XFS_SEND_PREUNMOUNT(mp,
569 rvp, DM_RIGHT_NULL, rvp, DM_RIGHT_NULL, 569 rip, DM_RIGHT_NULL, rip, DM_RIGHT_NULL,
570 NULL, NULL, 0, 0, 570 NULL, NULL, 0, 0,
571 (mp->m_dmevmask & (1<<DM_EVENT_PREUNMOUNT))? 571 (mp->m_dmevmask & (1<<DM_EVENT_PREUNMOUNT))?
572 0:DM_FLAGS_UNWANTED); 572 0:DM_FLAGS_UNWANTED);
@@ -617,7 +617,7 @@ out:
617 /* Note: mp structure must still exist for 617 /* Note: mp structure must still exist for
618 * XFS_SEND_UNMOUNT() call. 618 * XFS_SEND_UNMOUNT() call.
619 */ 619 */
620 XFS_SEND_UNMOUNT(mp, error == 0 ? rvp : NULL, 620 XFS_SEND_UNMOUNT(mp, error == 0 ? rip : NULL,
621 DM_RIGHT_NULL, 0, error, unmount_event_flags); 621 DM_RIGHT_NULL, 0, error, unmount_event_flags);
622 } 622 }
623 if (xfs_unmountfs_needed) { 623 if (xfs_unmountfs_needed) {
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index b77dede91b71..7e124b55c26b 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -326,7 +326,7 @@ xfs_setattr(
326 if (DM_EVENT_ENABLED(ip, DM_EVENT_TRUNCATE) && 326 if (DM_EVENT_ENABLED(ip, DM_EVENT_TRUNCATE) &&
327 !(flags & ATTR_DMI)) { 327 !(flags & ATTR_DMI)) {
328 int dmflags = AT_DELAY_FLAG(flags) | DM_SEM_FLAG_WR; 328 int dmflags = AT_DELAY_FLAG(flags) | DM_SEM_FLAG_WR;
329 code = XFS_SEND_DATA(mp, DM_EVENT_TRUNCATE, vp, 329 code = XFS_SEND_DATA(mp, DM_EVENT_TRUNCATE, ip,
330 vap->va_size, 0, dmflags, NULL); 330 vap->va_size, 0, dmflags, NULL);
331 if (code) { 331 if (code) {
332 lock_flags = 0; 332 lock_flags = 0;
@@ -881,7 +881,7 @@ xfs_setattr(
881 881
882 if (DM_EVENT_ENABLED(ip, DM_EVENT_ATTRIBUTE) && 882 if (DM_EVENT_ENABLED(ip, DM_EVENT_ATTRIBUTE) &&
883 !(flags & ATTR_DMI)) { 883 !(flags & ATTR_DMI)) {
884 (void) XFS_SEND_NAMESP(mp, DM_EVENT_ATTRIBUTE, vp, DM_RIGHT_NULL, 884 (void) XFS_SEND_NAMESP(mp, DM_EVENT_ATTRIBUTE, ip, DM_RIGHT_NULL,
885 NULL, DM_RIGHT_NULL, NULL, NULL, 885 NULL, DM_RIGHT_NULL, NULL, NULL,
886 0, 0, AT_DELAY_FLAG(flags)); 886 0, 0, AT_DELAY_FLAG(flags));
887 } 887 }
@@ -1586,9 +1586,8 @@ xfs_inactive(
1586 1586
1587 mp = ip->i_mount; 1587 mp = ip->i_mount;
1588 1588
1589 if (ip->i_d.di_nlink == 0 && DM_EVENT_ENABLED(ip, DM_EVENT_DESTROY)) { 1589 if (ip->i_d.di_nlink == 0 && DM_EVENT_ENABLED(ip, DM_EVENT_DESTROY))
1590 (void) XFS_SEND_DESTROY(mp, vp, DM_RIGHT_NULL); 1590 XFS_SEND_DESTROY(mp, ip, DM_RIGHT_NULL);
1591 }
1592 1591
1593 error = 0; 1592 error = 0;
1594 1593
@@ -1820,7 +1819,7 @@ xfs_create(
1820 1819
1821 if (DM_EVENT_ENABLED(dp, DM_EVENT_CREATE)) { 1820 if (DM_EVENT_ENABLED(dp, DM_EVENT_CREATE)) {
1822 error = XFS_SEND_NAMESP(mp, DM_EVENT_CREATE, 1821 error = XFS_SEND_NAMESP(mp, DM_EVENT_CREATE,
1823 dir_vp, DM_RIGHT_NULL, NULL, 1822 dp, DM_RIGHT_NULL, NULL,
1824 DM_RIGHT_NULL, name, NULL, 1823 DM_RIGHT_NULL, name, NULL,
1825 mode, 0, 0); 1824 mode, 0, 0);
1826 1825
@@ -1976,8 +1975,8 @@ std_return:
1976 if ((*vpp || (error != 0 && dm_event_sent != 0)) && 1975 if ((*vpp || (error != 0 && dm_event_sent != 0)) &&
1977 DM_EVENT_ENABLED(dp, DM_EVENT_POSTCREATE)) { 1976 DM_EVENT_ENABLED(dp, DM_EVENT_POSTCREATE)) {
1978 (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTCREATE, 1977 (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTCREATE,
1979 dir_vp, DM_RIGHT_NULL, 1978 dp, DM_RIGHT_NULL,
1980 *vpp ? vp:NULL, 1979 *vpp ? ip : NULL,
1981 DM_RIGHT_NULL, name, NULL, 1980 DM_RIGHT_NULL, name, NULL,
1982 mode, error, 0); 1981 mode, error, 0);
1983 } 1982 }
@@ -2272,7 +2271,6 @@ xfs_remove(
2272 xfs_inode_t *dp, 2271 xfs_inode_t *dp,
2273 bhv_vname_t *dentry) 2272 bhv_vname_t *dentry)
2274{ 2273{
2275 bhv_vnode_t *dir_vp = XFS_ITOV(dp);
2276 char *name = VNAME(dentry); 2274 char *name = VNAME(dentry);
2277 xfs_mount_t *mp = dp->i_mount; 2275 xfs_mount_t *mp = dp->i_mount;
2278 xfs_inode_t *ip = VNAME_TO_INODE(dentry); 2276 xfs_inode_t *ip = VNAME_TO_INODE(dentry);
@@ -2292,7 +2290,7 @@ xfs_remove(
2292 return XFS_ERROR(EIO); 2290 return XFS_ERROR(EIO);
2293 2291
2294 if (DM_EVENT_ENABLED(dp, DM_EVENT_REMOVE)) { 2292 if (DM_EVENT_ENABLED(dp, DM_EVENT_REMOVE)) {
2295 error = XFS_SEND_NAMESP(mp, DM_EVENT_REMOVE, dir_vp, 2293 error = XFS_SEND_NAMESP(mp, DM_EVENT_REMOVE, dp,
2296 DM_RIGHT_NULL, NULL, DM_RIGHT_NULL, 2294 DM_RIGHT_NULL, NULL, DM_RIGHT_NULL,
2297 name, NULL, ip->i_d.di_mode, 0, 0); 2295 name, NULL, ip->i_d.di_mode, 0, 0);
2298 if (error) 2296 if (error)
@@ -2445,7 +2443,7 @@ xfs_remove(
2445 std_return: 2443 std_return:
2446 if (DM_EVENT_ENABLED(dp, DM_EVENT_POSTREMOVE)) { 2444 if (DM_EVENT_ENABLED(dp, DM_EVENT_POSTREMOVE)) {
2447 (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTREMOVE, 2445 (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTREMOVE,
2448 dir_vp, DM_RIGHT_NULL, 2446 dp, DM_RIGHT_NULL,
2449 NULL, DM_RIGHT_NULL, 2447 NULL, DM_RIGHT_NULL,
2450 name, NULL, ip->i_d.di_mode, error, 0); 2448 name, NULL, ip->i_d.di_mode, error, 0);
2451 } 2449 }
@@ -2504,8 +2502,8 @@ xfs_link(
2504 2502
2505 if (DM_EVENT_ENABLED(tdp, DM_EVENT_LINK)) { 2503 if (DM_EVENT_ENABLED(tdp, DM_EVENT_LINK)) {
2506 error = XFS_SEND_NAMESP(mp, DM_EVENT_LINK, 2504 error = XFS_SEND_NAMESP(mp, DM_EVENT_LINK,
2507 target_dir_vp, DM_RIGHT_NULL, 2505 tdp, DM_RIGHT_NULL,
2508 src_vp, DM_RIGHT_NULL, 2506 sip, DM_RIGHT_NULL,
2509 target_name, NULL, 0, 0, 0); 2507 target_name, NULL, 0, 0, 0);
2510 if (error) 2508 if (error)
2511 return error; 2509 return error;
@@ -2615,8 +2613,8 @@ xfs_link(
2615std_return: 2613std_return:
2616 if (DM_EVENT_ENABLED(sip, DM_EVENT_POSTLINK)) { 2614 if (DM_EVENT_ENABLED(sip, DM_EVENT_POSTLINK)) {
2617 (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTLINK, 2615 (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTLINK,
2618 target_dir_vp, DM_RIGHT_NULL, 2616 tdp, DM_RIGHT_NULL,
2619 src_vp, DM_RIGHT_NULL, 2617 sip, DM_RIGHT_NULL,
2620 target_name, NULL, 0, error, 0); 2618 target_name, NULL, 0, error, 0);
2621 } 2619 }
2622 return error; 2620 return error;
@@ -2665,7 +2663,7 @@ xfs_mkdir(
2665 2663
2666 if (DM_EVENT_ENABLED(dp, DM_EVENT_CREATE)) { 2664 if (DM_EVENT_ENABLED(dp, DM_EVENT_CREATE)) {
2667 error = XFS_SEND_NAMESP(mp, DM_EVENT_CREATE, 2665 error = XFS_SEND_NAMESP(mp, DM_EVENT_CREATE,
2668 dir_vp, DM_RIGHT_NULL, NULL, 2666 dp, DM_RIGHT_NULL, NULL,
2669 DM_RIGHT_NULL, dir_name, NULL, 2667 DM_RIGHT_NULL, dir_name, NULL,
2670 mode, 0, 0); 2668 mode, 0, 0);
2671 if (error) 2669 if (error)
@@ -2823,8 +2821,8 @@ std_return:
2823 if ((created || (error != 0 && dm_event_sent != 0)) && 2821 if ((created || (error != 0 && dm_event_sent != 0)) &&
2824 DM_EVENT_ENABLED(dp, DM_EVENT_POSTCREATE)) { 2822 DM_EVENT_ENABLED(dp, DM_EVENT_POSTCREATE)) {
2825 (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTCREATE, 2823 (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTCREATE,
2826 dir_vp, DM_RIGHT_NULL, 2824 dp, DM_RIGHT_NULL,
2827 created ? XFS_ITOV(cdp):NULL, 2825 created ? cdp : NULL,
2828 DM_RIGHT_NULL, 2826 DM_RIGHT_NULL,
2829 dir_name, NULL, 2827 dir_name, NULL,
2830 mode, error, 0); 2828 mode, error, 0);
@@ -2873,7 +2871,7 @@ xfs_rmdir(
2873 2871
2874 if (DM_EVENT_ENABLED(dp, DM_EVENT_REMOVE)) { 2872 if (DM_EVENT_ENABLED(dp, DM_EVENT_REMOVE)) {
2875 error = XFS_SEND_NAMESP(mp, DM_EVENT_REMOVE, 2873 error = XFS_SEND_NAMESP(mp, DM_EVENT_REMOVE,
2876 dir_vp, DM_RIGHT_NULL, 2874 dp, DM_RIGHT_NULL,
2877 NULL, DM_RIGHT_NULL, 2875 NULL, DM_RIGHT_NULL,
2878 name, NULL, cdp->i_d.di_mode, 0, 0); 2876 name, NULL, cdp->i_d.di_mode, 0, 0);
2879 if (error) 2877 if (error)
@@ -3047,7 +3045,7 @@ xfs_rmdir(
3047 std_return: 3045 std_return:
3048 if (DM_EVENT_ENABLED(dp, DM_EVENT_POSTREMOVE)) { 3046 if (DM_EVENT_ENABLED(dp, DM_EVENT_POSTREMOVE)) {
3049 (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTREMOVE, 3047 (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTREMOVE,
3050 dir_vp, DM_RIGHT_NULL, 3048 dp, DM_RIGHT_NULL,
3051 NULL, DM_RIGHT_NULL, 3049 NULL, DM_RIGHT_NULL,
3052 name, NULL, cdp->i_d.di_mode, 3050 name, NULL, cdp->i_d.di_mode,
3053 error, 0); 3051 error, 0);
@@ -3144,7 +3142,7 @@ xfs_symlink(
3144 } 3142 }
3145 3143
3146 if (DM_EVENT_ENABLED(dp, DM_EVENT_SYMLINK)) { 3144 if (DM_EVENT_ENABLED(dp, DM_EVENT_SYMLINK)) {
3147 error = XFS_SEND_NAMESP(mp, DM_EVENT_SYMLINK, dir_vp, 3145 error = XFS_SEND_NAMESP(mp, DM_EVENT_SYMLINK, dp,
3148 DM_RIGHT_NULL, NULL, DM_RIGHT_NULL, 3146 DM_RIGHT_NULL, NULL, DM_RIGHT_NULL,
3149 link_name, target_path, 0, 0, 0); 3147 link_name, target_path, 0, 0, 0);
3150 if (error) 3148 if (error)
@@ -3348,8 +3346,8 @@ xfs_symlink(
3348std_return: 3346std_return:
3349 if (DM_EVENT_ENABLED(dp, DM_EVENT_POSTSYMLINK)) { 3347 if (DM_EVENT_ENABLED(dp, DM_EVENT_POSTSYMLINK)) {
3350 (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTSYMLINK, 3348 (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTSYMLINK,
3351 dir_vp, DM_RIGHT_NULL, 3349 dp, DM_RIGHT_NULL,
3352 error ? NULL : XFS_ITOV(ip), 3350 error ? NULL : ip,
3353 DM_RIGHT_NULL, link_name, target_path, 3351 DM_RIGHT_NULL, link_name, target_path,
3354 0, error, 0); 3352 0, error, 0);
3355 } 3353 }
@@ -3707,9 +3705,8 @@ xfs_alloc_file_space(
3707 end_dmi_offset = offset+len; 3705 end_dmi_offset = offset+len;
3708 if (end_dmi_offset > ip->i_size) 3706 if (end_dmi_offset > ip->i_size)
3709 end_dmi_offset = ip->i_size; 3707 end_dmi_offset = ip->i_size;
3710 error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, XFS_ITOV(ip), 3708 error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, ip, offset,
3711 offset, end_dmi_offset - offset, 3709 end_dmi_offset - offset, 0, NULL);
3712 0, NULL);
3713 if (error) 3710 if (error)
3714 return error; 3711 return error;
3715 } 3712 }
@@ -3818,8 +3815,8 @@ dmapi_enospc_check:
3818 if (error == ENOSPC && (attr_flags & ATTR_DMI) == 0 && 3815 if (error == ENOSPC && (attr_flags & ATTR_DMI) == 0 &&
3819 DM_EVENT_ENABLED(ip, DM_EVENT_NOSPACE)) { 3816 DM_EVENT_ENABLED(ip, DM_EVENT_NOSPACE)) {
3820 error = XFS_SEND_NAMESP(mp, DM_EVENT_NOSPACE, 3817 error = XFS_SEND_NAMESP(mp, DM_EVENT_NOSPACE,
3821 XFS_ITOV(ip), DM_RIGHT_NULL, 3818 ip, DM_RIGHT_NULL,
3822 XFS_ITOV(ip), DM_RIGHT_NULL, 3819 ip, DM_RIGHT_NULL,
3823 NULL, NULL, 0, 0, 0); /* Delay flag intentionally unused */ 3820 NULL, NULL, 0, 0, 0); /* Delay flag intentionally unused */
3824 if (error == 0) 3821 if (error == 0)
3825 goto retry; /* Maybe DMAPI app. has made space */ 3822 goto retry; /* Maybe DMAPI app. has made space */
@@ -3964,7 +3961,7 @@ xfs_free_file_space(
3964 DM_EVENT_ENABLED(ip, DM_EVENT_WRITE)) { 3961 DM_EVENT_ENABLED(ip, DM_EVENT_WRITE)) {
3965 if (end_dmi_offset > ip->i_size) 3962 if (end_dmi_offset > ip->i_size)
3966 end_dmi_offset = ip->i_size; 3963 end_dmi_offset = ip->i_size;
3967 error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, vp, 3964 error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, ip,
3968 offset, end_dmi_offset - offset, 3965 offset, end_dmi_offset - offset,
3969 AT_DELAY_FLAG(attr_flags), NULL); 3966 AT_DELAY_FLAG(attr_flags), NULL);
3970 if (error) 3967 if (error)