aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorVlad Apostolov <vapo@sgi.com>2006-09-27 21:02:30 -0400
committerTim Shimmin <tes@sgi.com>2006-09-27 21:02:30 -0400
commit17370097dace78c93d6fa32110983e74b981d192 (patch)
tree30d8436cbaff72f4fe4a89e6a6d1aeedfbfea65c /fs/xfs
parent745b1f47fc0c68dbb1ff440eec8889f61e57194b (diff)
[XFS] pass file mode on DMAPI remove events
SGI-PV: 953687 SGI-Modid: xfs-linux-melb:xfs-kern:26639a Signed-off-by: Vlad Apostolov <vapo@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_vnodeops.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 4fbc3e1cac00..1a6782eaf5d4 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -2366,10 +2366,15 @@ xfs_remove(
2366 2366
2367 namelen = VNAMELEN(dentry); 2367 namelen = VNAMELEN(dentry);
2368 2368
2369 if (!xfs_get_dir_entry(dentry, &ip)) {
2370 dm_di_mode = ip->i_d.di_mode;
2371 IRELE(ip);
2372 }
2373
2369 if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_REMOVE)) { 2374 if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_REMOVE)) {
2370 error = XFS_SEND_NAMESP(mp, DM_EVENT_REMOVE, dir_vp, 2375 error = XFS_SEND_NAMESP(mp, DM_EVENT_REMOVE, dir_vp,
2371 DM_RIGHT_NULL, NULL, DM_RIGHT_NULL, 2376 DM_RIGHT_NULL, NULL, DM_RIGHT_NULL,
2372 name, NULL, 0, 0, 0); 2377 name, NULL, dm_di_mode, 0, 0);
2373 if (error) 2378 if (error)
2374 return error; 2379 return error;
2375 } 2380 }
@@ -2995,7 +3000,7 @@ xfs_rmdir(
2995 int cancel_flags; 3000 int cancel_flags;
2996 int committed; 3001 int committed;
2997 bhv_vnode_t *dir_vp; 3002 bhv_vnode_t *dir_vp;
2998 int dm_di_mode = 0; 3003 int dm_di_mode = S_IFDIR;
2999 int last_cdp_link; 3004 int last_cdp_link;
3000 int namelen; 3005 int namelen;
3001 uint resblks; 3006 uint resblks;
@@ -3010,11 +3015,16 @@ xfs_rmdir(
3010 return XFS_ERROR(EIO); 3015 return XFS_ERROR(EIO);
3011 namelen = VNAMELEN(dentry); 3016 namelen = VNAMELEN(dentry);
3012 3017
3018 if (!xfs_get_dir_entry(dentry, &cdp)) {
3019 dm_di_mode = cdp->i_d.di_mode;
3020 IRELE(cdp);
3021 }
3022
3013 if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_REMOVE)) { 3023 if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_REMOVE)) {
3014 error = XFS_SEND_NAMESP(mp, DM_EVENT_REMOVE, 3024 error = XFS_SEND_NAMESP(mp, DM_EVENT_REMOVE,
3015 dir_vp, DM_RIGHT_NULL, 3025 dir_vp, DM_RIGHT_NULL,
3016 NULL, DM_RIGHT_NULL, 3026 NULL, DM_RIGHT_NULL,
3017 name, NULL, 0, 0, 0); 3027 name, NULL, dm_di_mode, 0, 0);
3018 if (error) 3028 if (error)
3019 return XFS_ERROR(error); 3029 return XFS_ERROR(error);
3020 } 3030 }