diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_file.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_file.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index 89b1a7421357..cf65a8364d5a 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c | |||
@@ -522,23 +522,18 @@ xfs_file_open_exec( | |||
522 | struct inode *inode) | 522 | struct inode *inode) |
523 | { | 523 | { |
524 | bhv_vnode_t *vp = vn_from_inode(inode); | 524 | bhv_vnode_t *vp = vn_from_inode(inode); |
525 | xfs_mount_t *mp = XFS_VFSTOM(vp->v_vfsp); | ||
526 | int error = 0; | ||
527 | xfs_inode_t *ip; | ||
528 | 525 | ||
529 | if (vp->v_vfsp->vfs_flag & VFS_DMI) { | 526 | if (unlikely(vp->v_vfsp->vfs_flag & VFS_DMI)) { |
530 | ip = xfs_vtoi(vp); | 527 | xfs_mount_t *mp = XFS_VFSTOM(vp->v_vfsp); |
531 | if (!ip) { | 528 | xfs_inode_t *ip = xfs_vtoi(vp); |
532 | error = -EINVAL; | 529 | |
533 | goto open_exec_out; | 530 | if (!ip) |
534 | } | 531 | return -EINVAL; |
535 | if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ)) { | 532 | if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ)) |
536 | error = -XFS_SEND_DATA(mp, DM_EVENT_READ, vp, | 533 | return -XFS_SEND_DATA(mp, DM_EVENT_READ, vp, |
537 | 0, 0, 0, NULL); | 534 | 0, 0, 0, NULL); |
538 | } | ||
539 | } | 535 | } |
540 | open_exec_out: | 536 | return 0; |
541 | return error; | ||
542 | } | 537 | } |
543 | #endif /* HAVE_FOP_OPEN_EXEC */ | 538 | #endif /* HAVE_FOP_OPEN_EXEC */ |
544 | 539 | ||