diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_iops.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_iops.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index cd42ef78f6b5..225946012d0b 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include "xfs_buf_item.h" | 47 | #include "xfs_buf_item.h" |
48 | #include "xfs_utils.h" | 48 | #include "xfs_utils.h" |
49 | #include "xfs_vnodeops.h" | 49 | #include "xfs_vnodeops.h" |
50 | #include "xfs_trace.h" | ||
50 | 51 | ||
51 | #include <linux/capability.h> | 52 | #include <linux/capability.h> |
52 | #include <linux/xattr.h> | 53 | #include <linux/xattr.h> |
@@ -573,8 +574,8 @@ xfs_vn_fallocate( | |||
573 | bf.l_len = len; | 574 | bf.l_len = len; |
574 | 575 | ||
575 | xfs_ilock(ip, XFS_IOLOCK_EXCL); | 576 | xfs_ilock(ip, XFS_IOLOCK_EXCL); |
576 | error = xfs_change_file_space(ip, XFS_IOC_RESVSP, &bf, | 577 | error = -xfs_change_file_space(ip, XFS_IOC_RESVSP, &bf, |
577 | 0, XFS_ATTR_NOLOCK); | 578 | 0, XFS_ATTR_NOLOCK); |
578 | if (!error && !(mode & FALLOC_FL_KEEP_SIZE) && | 579 | if (!error && !(mode & FALLOC_FL_KEEP_SIZE) && |
579 | offset + len > i_size_read(inode)) | 580 | offset + len > i_size_read(inode)) |
580 | new_size = offset + len; | 581 | new_size = offset + len; |
@@ -585,7 +586,7 @@ xfs_vn_fallocate( | |||
585 | 586 | ||
586 | iattr.ia_valid = ATTR_SIZE; | 587 | iattr.ia_valid = ATTR_SIZE; |
587 | iattr.ia_size = new_size; | 588 | iattr.ia_size = new_size; |
588 | error = xfs_setattr(ip, &iattr, XFS_ATTR_NOLOCK); | 589 | error = -xfs_setattr(ip, &iattr, XFS_ATTR_NOLOCK); |
589 | } | 590 | } |
590 | 591 | ||
591 | xfs_iunlock(ip, XFS_IOLOCK_EXCL); | 592 | xfs_iunlock(ip, XFS_IOLOCK_EXCL); |
@@ -793,7 +794,7 @@ xfs_setup_inode( | |||
793 | struct inode *inode = &ip->i_vnode; | 794 | struct inode *inode = &ip->i_vnode; |
794 | 795 | ||
795 | inode->i_ino = ip->i_ino; | 796 | inode->i_ino = ip->i_ino; |
796 | inode->i_state = I_NEW|I_LOCK; | 797 | inode->i_state = I_NEW; |
797 | inode_add_to_lists(ip->i_mount->m_super, inode); | 798 | inode_add_to_lists(ip->i_mount->m_super, inode); |
798 | 799 | ||
799 | inode->i_mode = ip->i_d.di_mode; | 800 | inode->i_mode = ip->i_d.di_mode; |