diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_iops.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_iops.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 22e3b714f629..3ba814ae3bba 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c | |||
@@ -623,12 +623,27 @@ xfs_vn_getattr( | |||
623 | { | 623 | { |
624 | struct inode *inode = dentry->d_inode; | 624 | struct inode *inode = dentry->d_inode; |
625 | bhv_vnode_t *vp = vn_from_inode(inode); | 625 | bhv_vnode_t *vp = vn_from_inode(inode); |
626 | int error = 0; | 626 | bhv_vattr_t vattr = { .va_mask = XFS_AT_STAT }; |
627 | int error; | ||
627 | 628 | ||
628 | if (unlikely(vp->v_flag & VMODIFIED)) | 629 | error = bhv_vop_getattr(vp, &vattr, ATTR_LAZY, NULL); |
629 | error = vn_revalidate(vp); | 630 | if (likely(!error)) { |
630 | if (!error) | 631 | stat->size = i_size_read(inode); |
631 | generic_fillattr(inode, stat); | 632 | stat->dev = inode->i_sb->s_dev; |
633 | stat->rdev = (vattr.va_rdev == 0) ? 0 : | ||
634 | MKDEV(sysv_major(vattr.va_rdev) & 0x1ff, | ||
635 | sysv_minor(vattr.va_rdev)); | ||
636 | stat->mode = vattr.va_mode; | ||
637 | stat->nlink = vattr.va_nlink; | ||
638 | stat->uid = vattr.va_uid; | ||
639 | stat->gid = vattr.va_gid; | ||
640 | stat->ino = vattr.va_nodeid; | ||
641 | stat->atime = vattr.va_atime; | ||
642 | stat->mtime = vattr.va_mtime; | ||
643 | stat->ctime = vattr.va_ctime; | ||
644 | stat->blocks = vattr.va_nblocks; | ||
645 | stat->blksize = vattr.va_blocksize; | ||
646 | } | ||
632 | return -error; | 647 | return -error; |
633 | } | 648 | } |
634 | 649 | ||