Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37145
b: refs/heads/master
c: 1737009
h: refs/heads/master
i:
  37143: b38d684
v: v3
  • Loading branch information
Vlad Apostolov authored and Tim Shimmin committed Sep 28, 2006
1 parent ac59887 commit f0ec929
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 745b1f47fc0c68dbb1ff440eec8889f61e57194b
refs/heads/master: 17370097dace78c93d6fa32110983e74b981d192
16 changes: 13 additions & 3 deletions trunk/fs/xfs/xfs_vnodeops.c
Original file line number Diff line number Diff line change
Expand Up @@ -2366,10 +2366,15 @@ xfs_remove(

namelen = VNAMELEN(dentry);

if (!xfs_get_dir_entry(dentry, &ip)) {
dm_di_mode = ip->i_d.di_mode;
IRELE(ip);
}

if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_REMOVE)) {
error = XFS_SEND_NAMESP(mp, DM_EVENT_REMOVE, dir_vp,
DM_RIGHT_NULL, NULL, DM_RIGHT_NULL,
name, NULL, 0, 0, 0);
name, NULL, dm_di_mode, 0, 0);
if (error)
return error;
}
Expand Down Expand Up @@ -2995,7 +3000,7 @@ xfs_rmdir(
int cancel_flags;
int committed;
bhv_vnode_t *dir_vp;
int dm_di_mode = 0;
int dm_di_mode = S_IFDIR;
int last_cdp_link;
int namelen;
uint resblks;
Expand All @@ -3010,11 +3015,16 @@ xfs_rmdir(
return XFS_ERROR(EIO);
namelen = VNAMELEN(dentry);

if (!xfs_get_dir_entry(dentry, &cdp)) {
dm_di_mode = cdp->i_d.di_mode;
IRELE(cdp);
}

if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_REMOVE)) {
error = XFS_SEND_NAMESP(mp, DM_EVENT_REMOVE,
dir_vp, DM_RIGHT_NULL,
NULL, DM_RIGHT_NULL,
name, NULL, 0, 0, 0);
name, NULL, dm_di_mode, 0, 0);
if (error)
return XFS_ERROR(error);
}
Expand Down

0 comments on commit f0ec929

Please sign in to comment.