From 28bf6800c36b5748a306ebd24dcf228e55bc62d0 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Mon, 19 Jun 2006 08:39:16 +1000 Subject: [PATCH] --- yaml --- r: 28440 b: refs/heads/master c: 1d47bec290a6f1f366192946840efef5076d9fc7 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/xfs/linux-2.6/xfs_file.c | 23 +++++++++-------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/[refs] b/[refs] index 61c9fd7a8ed5..52f88df6d1f5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d7ede1aa5dfff53e76dbabac5b8087341686f662 +refs/heads/master: 1d47bec290a6f1f366192946840efef5076d9fc7 diff --git a/trunk/fs/xfs/linux-2.6/xfs_file.c b/trunk/fs/xfs/linux-2.6/xfs_file.c index 89b1a7421357..cf65a8364d5a 100644 --- a/trunk/fs/xfs/linux-2.6/xfs_file.c +++ b/trunk/fs/xfs/linux-2.6/xfs_file.c @@ -522,23 +522,18 @@ xfs_file_open_exec( struct inode *inode) { bhv_vnode_t *vp = vn_from_inode(inode); - xfs_mount_t *mp = XFS_VFSTOM(vp->v_vfsp); - int error = 0; - xfs_inode_t *ip; - if (vp->v_vfsp->vfs_flag & VFS_DMI) { - ip = xfs_vtoi(vp); - if (!ip) { - error = -EINVAL; - goto open_exec_out; - } - if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ)) { - error = -XFS_SEND_DATA(mp, DM_EVENT_READ, vp, + if (unlikely(vp->v_vfsp->vfs_flag & VFS_DMI)) { + xfs_mount_t *mp = XFS_VFSTOM(vp->v_vfsp); + xfs_inode_t *ip = xfs_vtoi(vp); + + if (!ip) + return -EINVAL; + if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ)) + return -XFS_SEND_DATA(mp, DM_EVENT_READ, vp, 0, 0, 0, NULL); - } } -open_exec_out: - return error; + return 0; } #endif /* HAVE_FOP_OPEN_EXEC */