You need to sign in or sign up before continuing.
提交 eb9df39d 编写于 作者: C Christoph Hellwig 提交者: Tim Shimmin

[XFS] remove unessecary vfs argument to DM_EVENT_ENABLED

SGI-PV: 968690
SGI-Modid: xfs-linux-melb:xfs-kern:29340a
Signed-off-by: NChristoph Hellwig <hch@infradead.org>
Signed-off-by: NVlad Apostolov <vapo@sgi.com>
Signed-off-by: NTim Shimmin <tes@sgi.com>
上级 49ee6c91
...@@ -405,7 +405,7 @@ xfs_file_open_exec( ...@@ -405,7 +405,7 @@ xfs_file_open_exec(
if (!ip) if (!ip)
return -EINVAL; return -EINVAL;
if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ)) if (DM_EVENT_ENABLED(ip, DM_EVENT_READ))
return -XFS_SEND_DATA(mp, DM_EVENT_READ, vp, return -XFS_SEND_DATA(mp, DM_EVENT_READ, vp,
0, 0, 0, NULL); 0, 0, 0, NULL);
} }
......
...@@ -245,8 +245,7 @@ xfs_read( ...@@ -245,8 +245,7 @@ xfs_read(
mutex_lock(&inode->i_mutex); mutex_lock(&inode->i_mutex);
xfs_ilock(ip, XFS_IOLOCK_SHARED); xfs_ilock(ip, XFS_IOLOCK_SHARED);
if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ) && if (DM_EVENT_ENABLED(ip, DM_EVENT_READ) && !(ioflags & IO_INVIS)) {
!(ioflags & IO_INVIS)) {
bhv_vrwlock_t locktype = VRWLOCK_READ; bhv_vrwlock_t locktype = VRWLOCK_READ;
int dmflags = FILP_DELAY_FLAG(file) | DM_SEM_FLAG_RD(ioflags); int dmflags = FILP_DELAY_FLAG(file) | DM_SEM_FLAG_RD(ioflags);
...@@ -307,8 +306,7 @@ xfs_splice_read( ...@@ -307,8 +306,7 @@ xfs_splice_read(
xfs_ilock(ip, XFS_IOLOCK_SHARED); xfs_ilock(ip, XFS_IOLOCK_SHARED);
if (DM_EVENT_ENABLED(BHV_TO_VNODE(bdp)->v_vfsp, ip, DM_EVENT_READ) && if (DM_EVENT_ENABLED(ip, DM_EVENT_READ) && !(ioflags & IO_INVIS)) {
(!(ioflags & IO_INVIS))) {
bhv_vrwlock_t locktype = VRWLOCK_READ; bhv_vrwlock_t locktype = VRWLOCK_READ;
int error; int error;
...@@ -354,8 +352,7 @@ xfs_splice_write( ...@@ -354,8 +352,7 @@ xfs_splice_write(
xfs_ilock(ip, XFS_IOLOCK_EXCL); xfs_ilock(ip, XFS_IOLOCK_EXCL);
if (DM_EVENT_ENABLED(BHV_TO_VNODE(bdp)->v_vfsp, ip, DM_EVENT_WRITE) && if (DM_EVENT_ENABLED(ip, DM_EVENT_WRITE) && !(ioflags & IO_INVIS)) {
(!(ioflags & IO_INVIS))) {
bhv_vrwlock_t locktype = VRWLOCK_WRITE; bhv_vrwlock_t locktype = VRWLOCK_WRITE;
int error; int error;
...@@ -664,7 +661,7 @@ xfs_write( ...@@ -664,7 +661,7 @@ xfs_write(
goto out_unlock_mutex; goto out_unlock_mutex;
} }
if ((DM_EVENT_ENABLED(vp->v_vfsp, xip, DM_EVENT_WRITE) && if ((DM_EVENT_ENABLED(xip, DM_EVENT_WRITE) &&
!(ioflags & IO_INVIS) && !eventsent)) { !(ioflags & IO_INVIS) && !eventsent)) {
int dmflags = FILP_DELAY_FLAG(file); int dmflags = FILP_DELAY_FLAG(file);
...@@ -816,10 +813,8 @@ xfs_write( ...@@ -816,10 +813,8 @@ xfs_write(
if (ret == -EIOCBQUEUED && !(ioflags & IO_ISAIO)) if (ret == -EIOCBQUEUED && !(ioflags & IO_ISAIO))
ret = wait_on_sync_kiocb(iocb); ret = wait_on_sync_kiocb(iocb);
if ((ret == -ENOSPC) && if (ret == -ENOSPC &&
DM_EVENT_ENABLED(vp->v_vfsp, xip, DM_EVENT_NOSPACE) && DM_EVENT_ENABLED(xip, DM_EVENT_NOSPACE) && !(ioflags & IO_INVIS)) {
!(ioflags & IO_INVIS)) {
xfs_rwunlock(bdp, locktype); xfs_rwunlock(bdp, locktype);
if (need_i_mutex) if (need_i_mutex)
mutex_unlock(&inode->i_mutex); mutex_unlock(&inode->i_mutex);
......
...@@ -5811,10 +5811,9 @@ xfs_getbmap( ...@@ -5811,10 +5811,9 @@ xfs_getbmap(
* could misinterpret holes in a DMAPI file as true holes, * could misinterpret holes in a DMAPI file as true holes,
* when in fact they may represent offline user data. * when in fact they may represent offline user data.
*/ */
if ( (interface & BMV_IF_NO_DMAPI_READ) == 0 if ((interface & BMV_IF_NO_DMAPI_READ) == 0 &&
&& DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ) DM_EVENT_ENABLED(ip, DM_EVENT_READ) &&
&& whichfork == XFS_DATA_FORK) { whichfork == XFS_DATA_FORK) {
error = XFS_SEND_DATA(mp, DM_EVENT_READ, vp, 0, 0, 0, NULL); error = XFS_SEND_DATA(mp, DM_EVENT_READ, vp, 0, 0, 0, NULL);
if (error) if (error)
return XFS_ERROR(error); return XFS_ERROR(error);
......
...@@ -67,18 +67,12 @@ typedef enum { ...@@ -67,18 +67,12 @@ typedef enum {
#define HAVE_DM_RIGHT_T #define HAVE_DM_RIGHT_T
/* Defines for determining if an event message should be sent. */ /* Defines for determining if an event message should be sent. */
#define DM_EVENT_ENABLED(vfsp, ip, event) ( \ #define DM_EVENT_ENABLED(ip, event) ( \
unlikely ((vfsp)->vfs_flag & VFS_DMI) && \ unlikely (XFS_MTOVFS((ip)->i_mount)->vfs_flag & VFS_DMI) && \
( ((ip)->i_d.di_dmevmask & (1 << event)) || \ ( ((ip)->i_d.di_dmevmask & (1 << event)) || \
((ip)->i_mount->m_dmevmask & (1 << event)) ) \ ((ip)->i_mount->m_dmevmask & (1 << event)) ) \
) )
#define DM_EVENT_ENABLED_IO(vfsp, io, event) ( \
unlikely ((vfsp)->vfs_flag & VFS_DMI) && \
( ((io)->io_dmevmask & (1 << event)) || \
((io)->io_mount->m_dmevmask & (1 << event)) ) \
)
#define DM_XFS_VALID_FS_EVENTS ( \ #define DM_XFS_VALID_FS_EVENTS ( \
(1 << DM_EVENT_PREUNMOUNT) | \ (1 << DM_EVENT_PREUNMOUNT) | \
(1 << DM_EVENT_UNMOUNT) | \ (1 << DM_EVENT_UNMOUNT) | \
......
...@@ -264,9 +264,8 @@ xfs_rename( ...@@ -264,9 +264,8 @@ xfs_rename(
src_dp = XFS_BHVTOI(src_dir_bdp); src_dp = XFS_BHVTOI(src_dir_bdp);
mp = src_dp->i_mount; mp = src_dp->i_mount;
if (DM_EVENT_ENABLED(src_dir_vp->v_vfsp, src_dp, DM_EVENT_RENAME) || if (DM_EVENT_ENABLED(src_dp, DM_EVENT_RENAME) ||
DM_EVENT_ENABLED(target_dir_vp->v_vfsp, DM_EVENT_ENABLED(target_dp, DM_EVENT_RENAME)) {
target_dp, DM_EVENT_RENAME)) {
error = XFS_SEND_NAMESP(mp, DM_EVENT_RENAME, error = XFS_SEND_NAMESP(mp, DM_EVENT_RENAME,
src_dir_vp, DM_RIGHT_NULL, src_dir_vp, DM_RIGHT_NULL,
target_dir_vp, DM_RIGHT_NULL, target_dir_vp, DM_RIGHT_NULL,
...@@ -603,9 +602,8 @@ xfs_rename( ...@@ -603,9 +602,8 @@ xfs_rename(
/* Fall through to std_return with error = 0 or errno from /* Fall through to std_return with error = 0 or errno from
* xfs_trans_commit */ * xfs_trans_commit */
std_return: std_return:
if (DM_EVENT_ENABLED(src_dir_vp->v_vfsp, src_dp, DM_EVENT_POSTRENAME) || if (DM_EVENT_ENABLED(src_dp, DM_EVENT_POSTRENAME) ||
DM_EVENT_ENABLED(target_dir_vp->v_vfsp, DM_EVENT_ENABLED(target_dp, DM_EVENT_POSTRENAME)) {
target_dp, DM_EVENT_POSTRENAME)) {
(void) XFS_SEND_NAMESP (mp, DM_EVENT_POSTRENAME, (void) XFS_SEND_NAMESP (mp, DM_EVENT_POSTRENAME,
src_dir_vp, DM_RIGHT_NULL, src_dir_vp, DM_RIGHT_NULL,
target_dir_vp, DM_RIGHT_NULL, target_dir_vp, DM_RIGHT_NULL,
......
...@@ -337,7 +337,7 @@ xfs_setattr( ...@@ -337,7 +337,7 @@ xfs_setattr(
} }
} }
} else { } else {
if (DM_EVENT_ENABLED (vp->v_vfsp, ip, DM_EVENT_TRUNCATE) && if (DM_EVENT_ENABLED(ip, DM_EVENT_TRUNCATE) &&
!(flags & ATTR_DMI)) { !(flags & ATTR_DMI)) {
int dmflags = AT_DELAY_FLAG(flags) | DM_SEM_FLAG_WR; int dmflags = AT_DELAY_FLAG(flags) | DM_SEM_FLAG_WR;
code = XFS_SEND_DATA(mp, DM_EVENT_TRUNCATE, vp, code = XFS_SEND_DATA(mp, DM_EVENT_TRUNCATE, vp,
...@@ -896,7 +896,7 @@ xfs_setattr( ...@@ -896,7 +896,7 @@ xfs_setattr(
return code; return code;
} }
if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_ATTRIBUTE) && if (DM_EVENT_ENABLED(ip, DM_EVENT_ATTRIBUTE) &&
!(flags & ATTR_DMI)) { !(flags & ATTR_DMI)) {
(void) XFS_SEND_NAMESP(mp, DM_EVENT_ATTRIBUTE, vp, DM_RIGHT_NULL, (void) XFS_SEND_NAMESP(mp, DM_EVENT_ATTRIBUTE, vp, DM_RIGHT_NULL,
NULL, DM_RIGHT_NULL, NULL, NULL, NULL, DM_RIGHT_NULL, NULL, NULL,
...@@ -1666,8 +1666,7 @@ xfs_inactive( ...@@ -1666,8 +1666,7 @@ xfs_inactive(
mp = ip->i_mount; mp = ip->i_mount;
if (ip->i_d.di_nlink == 0 && if (ip->i_d.di_nlink == 0 && DM_EVENT_ENABLED(ip, DM_EVENT_DESTROY)) {
DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_DESTROY)) {
(void) XFS_SEND_DESTROY(mp, vp, DM_RIGHT_NULL); (void) XFS_SEND_DESTROY(mp, vp, DM_RIGHT_NULL);
} }
...@@ -1922,7 +1921,7 @@ xfs_create( ...@@ -1922,7 +1921,7 @@ xfs_create(
dm_di_mode = vap->va_mode; dm_di_mode = vap->va_mode;
namelen = VNAMELEN(dentry); namelen = VNAMELEN(dentry);
if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_CREATE)) { if (DM_EVENT_ENABLED(dp, DM_EVENT_CREATE)) {
error = XFS_SEND_NAMESP(mp, DM_EVENT_CREATE, error = XFS_SEND_NAMESP(mp, DM_EVENT_CREATE,
dir_vp, DM_RIGHT_NULL, NULL, dir_vp, DM_RIGHT_NULL, NULL,
DM_RIGHT_NULL, name, NULL, DM_RIGHT_NULL, name, NULL,
...@@ -2087,9 +2086,8 @@ xfs_create( ...@@ -2087,9 +2086,8 @@ xfs_create(
/* Fallthrough to std_return with error = 0 */ /* Fallthrough to std_return with error = 0 */
std_return: std_return:
if ( (*vpp || (error != 0 && dm_event_sent != 0)) && if ((*vpp || (error != 0 && dm_event_sent != 0)) &&
DM_EVENT_ENABLED(dir_vp->v_vfsp, XFS_BHVTOI(dir_bdp), DM_EVENT_ENABLED(XFS_BHVTOI(dir_bdp), DM_EVENT_POSTCREATE)) {
DM_EVENT_POSTCREATE)) {
(void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTCREATE, (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTCREATE,
dir_vp, DM_RIGHT_NULL, dir_vp, DM_RIGHT_NULL,
*vpp ? vp:NULL, *vpp ? vp:NULL,
...@@ -2423,7 +2421,7 @@ xfs_remove( ...@@ -2423,7 +2421,7 @@ xfs_remove(
IRELE(ip); IRELE(ip);
} }
if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_REMOVE)) { if (DM_EVENT_ENABLED(dp, DM_EVENT_REMOVE)) {
error = XFS_SEND_NAMESP(mp, DM_EVENT_REMOVE, dir_vp, error = XFS_SEND_NAMESP(mp, DM_EVENT_REMOVE, dir_vp,
DM_RIGHT_NULL, NULL, DM_RIGHT_NULL, DM_RIGHT_NULL, NULL, DM_RIGHT_NULL,
name, NULL, dm_di_mode, 0, 0); name, NULL, dm_di_mode, 0, 0);
...@@ -2599,8 +2597,7 @@ xfs_remove( ...@@ -2599,8 +2597,7 @@ xfs_remove(
/* Fall through to std_return with error = 0 */ /* Fall through to std_return with error = 0 */
std_return: std_return:
if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, if (DM_EVENT_ENABLED(dp, DM_EVENT_POSTREMOVE)) {
DM_EVENT_POSTREMOVE)) {
(void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTREMOVE, (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTREMOVE,
dir_vp, DM_RIGHT_NULL, dir_vp, DM_RIGHT_NULL,
NULL, DM_RIGHT_NULL, NULL, DM_RIGHT_NULL,
...@@ -2677,7 +2674,7 @@ xfs_link( ...@@ -2677,7 +2674,7 @@ xfs_link(
if (XFS_FORCED_SHUTDOWN(mp)) if (XFS_FORCED_SHUTDOWN(mp))
return XFS_ERROR(EIO); return XFS_ERROR(EIO);
if (DM_EVENT_ENABLED(src_vp->v_vfsp, tdp, DM_EVENT_LINK)) { if (DM_EVENT_ENABLED(tdp, DM_EVENT_LINK)) {
error = XFS_SEND_NAMESP(mp, DM_EVENT_LINK, error = XFS_SEND_NAMESP(mp, DM_EVENT_LINK,
target_dir_vp, DM_RIGHT_NULL, target_dir_vp, DM_RIGHT_NULL,
src_vp, DM_RIGHT_NULL, src_vp, DM_RIGHT_NULL,
...@@ -2788,8 +2785,7 @@ xfs_link( ...@@ -2788,8 +2785,7 @@ xfs_link(
/* Fall through to std_return with error = 0. */ /* Fall through to std_return with error = 0. */
std_return: std_return:
if (DM_EVENT_ENABLED(src_vp->v_vfsp, sip, if (DM_EVENT_ENABLED(sip, DM_EVENT_POSTLINK)) {
DM_EVENT_POSTLINK)) {
(void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTLINK, (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTLINK,
target_dir_vp, DM_RIGHT_NULL, target_dir_vp, DM_RIGHT_NULL,
src_vp, DM_RIGHT_NULL, src_vp, DM_RIGHT_NULL,
...@@ -2853,7 +2849,7 @@ xfs_mkdir( ...@@ -2853,7 +2849,7 @@ xfs_mkdir(
dp_joined_to_trans = B_FALSE; dp_joined_to_trans = B_FALSE;
dm_di_mode = vap->va_mode; dm_di_mode = vap->va_mode;
if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_CREATE)) { if (DM_EVENT_ENABLED(dp, DM_EVENT_CREATE)) {
error = XFS_SEND_NAMESP(mp, DM_EVENT_CREATE, error = XFS_SEND_NAMESP(mp, DM_EVENT_CREATE,
dir_vp, DM_RIGHT_NULL, NULL, dir_vp, DM_RIGHT_NULL, NULL,
DM_RIGHT_NULL, dir_name, NULL, DM_RIGHT_NULL, dir_name, NULL,
...@@ -3010,9 +3006,8 @@ xfs_mkdir( ...@@ -3010,9 +3006,8 @@ xfs_mkdir(
* xfs_trans_commit. */ * xfs_trans_commit. */
std_return: std_return:
if ( (created || (error != 0 && dm_event_sent != 0)) && if ((created || (error != 0 && dm_event_sent != 0)) &&
DM_EVENT_ENABLED(dir_vp->v_vfsp, XFS_BHVTOI(dir_bdp), DM_EVENT_ENABLED(XFS_BHVTOI(dir_bdp), DM_EVENT_POSTCREATE)) {
DM_EVENT_POSTCREATE)) {
(void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTCREATE, (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTCREATE,
dir_vp, DM_RIGHT_NULL, dir_vp, DM_RIGHT_NULL,
created ? XFS_ITOV(cdp):NULL, created ? XFS_ITOV(cdp):NULL,
...@@ -3081,7 +3076,7 @@ xfs_rmdir( ...@@ -3081,7 +3076,7 @@ xfs_rmdir(
IRELE(cdp); IRELE(cdp);
} }
if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_REMOVE)) { if (DM_EVENT_ENABLED(dp, DM_EVENT_REMOVE)) {
error = XFS_SEND_NAMESP(mp, DM_EVENT_REMOVE, error = XFS_SEND_NAMESP(mp, DM_EVENT_REMOVE,
dir_vp, DM_RIGHT_NULL, dir_vp, DM_RIGHT_NULL,
NULL, DM_RIGHT_NULL, NULL, DM_RIGHT_NULL,
...@@ -3270,7 +3265,7 @@ xfs_rmdir( ...@@ -3270,7 +3265,7 @@ xfs_rmdir(
/* Fall through to std_return with error = 0 or the errno /* Fall through to std_return with error = 0 or the errno
* from xfs_trans_commit. */ * from xfs_trans_commit. */
std_return: std_return:
if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_POSTREMOVE)) { if (DM_EVENT_ENABLED(dp, DM_EVENT_POSTREMOVE)) {
(void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTREMOVE, (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTREMOVE,
dir_vp, DM_RIGHT_NULL, dir_vp, DM_RIGHT_NULL,
NULL, DM_RIGHT_NULL, NULL, DM_RIGHT_NULL,
...@@ -3405,7 +3400,7 @@ xfs_symlink( ...@@ -3405,7 +3400,7 @@ xfs_symlink(
} }
} }
if (DM_EVENT_ENABLED(dir_vp->v_vfsp, dp, DM_EVENT_SYMLINK)) { if (DM_EVENT_ENABLED(dp, DM_EVENT_SYMLINK)) {
error = XFS_SEND_NAMESP(mp, DM_EVENT_SYMLINK, dir_vp, error = XFS_SEND_NAMESP(mp, DM_EVENT_SYMLINK, dir_vp,
DM_RIGHT_NULL, NULL, DM_RIGHT_NULL, DM_RIGHT_NULL, NULL, DM_RIGHT_NULL,
link_name, target_path, 0, 0, 0); link_name, target_path, 0, 0, 0);
...@@ -3605,8 +3600,7 @@ xfs_symlink( ...@@ -3605,8 +3600,7 @@ xfs_symlink(
/* Fall through to std_return with error = 0 or errno from /* Fall through to std_return with error = 0 or errno from
* xfs_trans_commit */ * xfs_trans_commit */
std_return: std_return:
if (DM_EVENT_ENABLED(dir_vp->v_vfsp, XFS_BHVTOI(dir_bdp), if (DM_EVENT_ENABLED(XFS_BHVTOI(dir_bdp), DM_EVENT_POSTSYMLINK)) {
DM_EVENT_POSTSYMLINK)) {
(void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTSYMLINK, (void) XFS_SEND_NAMESP(mp, DM_EVENT_POSTSYMLINK,
dir_vp, DM_RIGHT_NULL, dir_vp, DM_RIGHT_NULL,
error ? NULL : XFS_ITOV(ip), error ? NULL : XFS_ITOV(ip),
...@@ -4109,7 +4103,7 @@ xfs_alloc_file_space( ...@@ -4109,7 +4103,7 @@ xfs_alloc_file_space(
/* Generate a DMAPI event if needed. */ /* Generate a DMAPI event if needed. */
if (alloc_type != 0 && offset < ip->i_size && if (alloc_type != 0 && offset < ip->i_size &&
(attr_flags&ATTR_DMI) == 0 && (attr_flags&ATTR_DMI) == 0 &&
DM_EVENT_ENABLED(XFS_MTOVFS(mp), ip, DM_EVENT_WRITE)) { DM_EVENT_ENABLED(ip, DM_EVENT_WRITE)) {
xfs_off_t end_dmi_offset; xfs_off_t end_dmi_offset;
end_dmi_offset = offset+len; end_dmi_offset = offset+len;
...@@ -4223,9 +4217,8 @@ xfs_alloc_file_space( ...@@ -4223,9 +4217,8 @@ xfs_alloc_file_space(
allocatesize_fsb -= allocated_fsb; allocatesize_fsb -= allocated_fsb;
} }
dmapi_enospc_check: dmapi_enospc_check:
if (error == ENOSPC && (attr_flags&ATTR_DMI) == 0 && if (error == ENOSPC && (attr_flags & ATTR_DMI) == 0 &&
DM_EVENT_ENABLED(XFS_MTOVFS(mp), ip, DM_EVENT_NOSPACE)) { DM_EVENT_ENABLED(ip, DM_EVENT_NOSPACE)) {
error = XFS_SEND_NAMESP(mp, DM_EVENT_NOSPACE, error = XFS_SEND_NAMESP(mp, DM_EVENT_NOSPACE,
XFS_ITOV(ip), DM_RIGHT_NULL, XFS_ITOV(ip), DM_RIGHT_NULL,
XFS_ITOV(ip), DM_RIGHT_NULL, XFS_ITOV(ip), DM_RIGHT_NULL,
...@@ -4369,9 +4362,8 @@ xfs_free_file_space( ...@@ -4369,9 +4362,8 @@ xfs_free_file_space(
end_dmi_offset = offset + len; end_dmi_offset = offset + len;
endoffset_fsb = XFS_B_TO_FSBT(mp, end_dmi_offset); endoffset_fsb = XFS_B_TO_FSBT(mp, end_dmi_offset);
if (offset < ip->i_size && if (offset < ip->i_size && (attr_flags & ATTR_DMI) == 0 &&
(attr_flags & ATTR_DMI) == 0 && DM_EVENT_ENABLED(ip, DM_EVENT_WRITE)) {
DM_EVENT_ENABLED(XFS_MTOVFS(mp), ip, DM_EVENT_WRITE)) {
if (end_dmi_offset > ip->i_size) if (end_dmi_offset > ip->i_size)
end_dmi_offset = ip->i_size; end_dmi_offset = ip->i_size;
error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, vp, error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, vp,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册