aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_file.c')
-rw-r--r--fs/xfs/xfs_file.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 754caa0e8ef2..181605da08e4 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -155,7 +155,7 @@ xfs_dir_fsync(
155 155
156 if (!lsn) 156 if (!lsn)
157 return 0; 157 return 0;
158 return -_xfs_log_force_lsn(mp, lsn, XFS_LOG_SYNC, NULL); 158 return _xfs_log_force_lsn(mp, lsn, XFS_LOG_SYNC, NULL);
159} 159}
160 160
161STATIC int 161STATIC int
@@ -225,7 +225,7 @@ xfs_file_fsync(
225 !log_flushed) 225 !log_flushed)
226 xfs_blkdev_issue_flush(mp->m_ddev_targp); 226 xfs_blkdev_issue_flush(mp->m_ddev_targp);
227 227
228 return -error; 228 return error;
229} 229}
230 230
231STATIC ssize_t 231STATIC ssize_t
@@ -524,7 +524,7 @@ restart:
524 xfs_rw_ilock(ip, *iolock); 524 xfs_rw_ilock(ip, *iolock);
525 goto restart; 525 goto restart;
526 } 526 }
527 error = -xfs_zero_eof(ip, *pos, i_size_read(inode)); 527 error = xfs_zero_eof(ip, *pos, i_size_read(inode));
528 if (error) 528 if (error)
529 return error; 529 return error;
530 } 530 }
@@ -772,7 +772,7 @@ xfs_file_fallocate(
772 unsigned blksize_mask = (1 << inode->i_blkbits) - 1; 772 unsigned blksize_mask = (1 << inode->i_blkbits) - 1;
773 773
774 if (offset & blksize_mask || len & blksize_mask) { 774 if (offset & blksize_mask || len & blksize_mask) {
775 error = EINVAL; 775 error = -EINVAL;
776 goto out_unlock; 776 goto out_unlock;
777 } 777 }
778 778
@@ -781,7 +781,7 @@ xfs_file_fallocate(
781 * in which case it is effectively a truncate operation 781 * in which case it is effectively a truncate operation
782 */ 782 */
783 if (offset + len >= i_size_read(inode)) { 783 if (offset + len >= i_size_read(inode)) {
784 error = EINVAL; 784 error = -EINVAL;
785 goto out_unlock; 785 goto out_unlock;
786 } 786 }
787 787
@@ -794,7 +794,7 @@ xfs_file_fallocate(
794 if (!(mode & FALLOC_FL_KEEP_SIZE) && 794 if (!(mode & FALLOC_FL_KEEP_SIZE) &&
795 offset + len > i_size_read(inode)) { 795 offset + len > i_size_read(inode)) {
796 new_size = offset + len; 796 new_size = offset + len;
797 error = -inode_newsize_ok(inode, new_size); 797 error = inode_newsize_ok(inode, new_size);
798 if (error) 798 if (error)
799 goto out_unlock; 799 goto out_unlock;
800 } 800 }
@@ -844,7 +844,7 @@ xfs_file_fallocate(
844 844
845out_unlock: 845out_unlock:
846 xfs_iunlock(ip, XFS_IOLOCK_EXCL); 846 xfs_iunlock(ip, XFS_IOLOCK_EXCL);
847 return -error; 847 return error;
848} 848}
849 849
850 850
@@ -889,7 +889,7 @@ xfs_file_release(
889 struct inode *inode, 889 struct inode *inode,
890 struct file *filp) 890 struct file *filp)
891{ 891{
892 return -xfs_release(XFS_I(inode)); 892 return xfs_release(XFS_I(inode));
893} 893}
894 894
895STATIC int 895STATIC int
@@ -918,7 +918,7 @@ xfs_file_readdir(
918 918
919 error = xfs_readdir(ip, ctx, bufsize); 919 error = xfs_readdir(ip, ctx, bufsize);
920 if (error) 920 if (error)
921 return -error; 921 return error;
922 return 0; 922 return 0;
923} 923}
924 924
@@ -1184,7 +1184,7 @@ xfs_seek_data(
1184 1184
1185 isize = i_size_read(inode); 1185 isize = i_size_read(inode);
1186 if (start >= isize) { 1186 if (start >= isize) {
1187 error = ENXIO; 1187 error = -ENXIO;
1188 goto out_unlock; 1188 goto out_unlock;
1189 } 1189 }
1190 1190
@@ -1206,7 +1206,7 @@ xfs_seek_data(
1206 1206
1207 /* No extents at given offset, must be beyond EOF */ 1207 /* No extents at given offset, must be beyond EOF */
1208 if (nmap == 0) { 1208 if (nmap == 0) {
1209 error = ENXIO; 1209 error = -ENXIO;
1210 goto out_unlock; 1210 goto out_unlock;
1211 } 1211 }
1212 1212
@@ -1237,7 +1237,7 @@ xfs_seek_data(
1237 * we are reading after EOF if nothing in map[1]. 1237 * we are reading after EOF if nothing in map[1].
1238 */ 1238 */
1239 if (nmap == 1) { 1239 if (nmap == 1) {
1240 error = ENXIO; 1240 error = -ENXIO;
1241 goto out_unlock; 1241 goto out_unlock;
1242 } 1242 }
1243 1243
@@ -1250,7 +1250,7 @@ xfs_seek_data(
1250 fsbno = map[i - 1].br_startoff + map[i - 1].br_blockcount; 1250 fsbno = map[i - 1].br_startoff + map[i - 1].br_blockcount;
1251 start = XFS_FSB_TO_B(mp, fsbno); 1251 start = XFS_FSB_TO_B(mp, fsbno);
1252 if (start >= isize) { 1252 if (start >= isize) {
1253 error = ENXIO; 1253 error = -ENXIO;
1254 goto out_unlock; 1254 goto out_unlock;
1255 } 1255 }
1256 } 1256 }
@@ -1262,7 +1262,7 @@ out_unlock:
1262 xfs_iunlock(ip, lock); 1262 xfs_iunlock(ip, lock);
1263 1263
1264 if (error) 1264 if (error)
1265 return -error; 1265 return error;
1266 return offset; 1266 return offset;
1267} 1267}
1268 1268
@@ -1288,7 +1288,7 @@ xfs_seek_hole(
1288 1288
1289 isize = i_size_read(inode); 1289 isize = i_size_read(inode);
1290 if (start >= isize) { 1290 if (start >= isize) {
1291 error = ENXIO; 1291 error = -ENXIO;
1292 goto out_unlock; 1292 goto out_unlock;
1293 } 1293 }
1294 1294
@@ -1307,7 +1307,7 @@ xfs_seek_hole(
1307 1307
1308 /* No extents at given offset, must be beyond EOF */ 1308 /* No extents at given offset, must be beyond EOF */
1309 if (nmap == 0) { 1309 if (nmap == 0) {
1310 error = ENXIO; 1310 error = -ENXIO;
1311 goto out_unlock; 1311 goto out_unlock;
1312 } 1312 }
1313 1313
@@ -1370,7 +1370,7 @@ out_unlock:
1370 xfs_iunlock(ip, lock); 1370 xfs_iunlock(ip, lock);
1371 1371
1372 if (error) 1372 if (error)
1373 return -error; 1373 return error;
1374 return offset; 1374 return offset;
1375} 1375}
1376 1376