aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2014-11-30 17:03:02 -0500
committerDave Chinner <david@fromorbit.com>2014-11-30 17:03:02 -0500
commitc14fc01340dd0afe58d8671acc3ea5e907e707ae (patch)
tree15d26839e5ab12a186e1ad7265020ba6112ac639 /fs
parent216875a594e0b4fc72830e3690b8fbe7430738e2 (diff)
parentd254aaec5d1aa2997dad035db340c298eaa8d089 (diff)
Merge branch 'xfs-coccinelle-cleanups' into for-next
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/libxfs/xfs_bmap.c6
-rw-r--r--fs/xfs/libxfs/xfs_ialloc.c6
-rw-r--r--fs/xfs/xfs_file.c6
-rw-r--r--fs/xfs/xfs_qm.c12
-rw-r--r--fs/xfs/xfs_super.c3
5 files changed, 9 insertions, 24 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index c2a36c331b9c..80e33888ecc6 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -5589,12 +5589,8 @@ shift_extent:
5589 XFS_WANT_CORRUPTED_GOTO(i == 1, out_error); 5589 XFS_WANT_CORRUPTED_GOTO(i == 1, out_error);
5590 5590
5591 got.br_startoff = startoff; 5591 got.br_startoff = startoff;
5592 error = xfs_bmbt_update(cur, got.br_startoff, got.br_startblock, 5592 return xfs_bmbt_update(cur, got.br_startoff, got.br_startblock,
5593 got.br_blockcount, got.br_state); 5593 got.br_blockcount, got.br_state);
5594 if (error)
5595 return error;
5596
5597 return 0;
5598 5594
5599out_error: 5595out_error:
5600 return error; 5596 return error;
diff --git a/fs/xfs/libxfs/xfs_ialloc.c b/fs/xfs/libxfs/xfs_ialloc.c
index 92d2617e61fa..d1dc590a7c54 100644
--- a/fs/xfs/libxfs/xfs_ialloc.c
+++ b/fs/xfs/libxfs/xfs_ialloc.c
@@ -1134,11 +1134,7 @@ xfs_dialloc_ag_update_inobt(
1134 XFS_WANT_CORRUPTED_RETURN((rec.ir_free == frec->ir_free) && 1134 XFS_WANT_CORRUPTED_RETURN((rec.ir_free == frec->ir_free) &&
1135 (rec.ir_freecount == frec->ir_freecount)); 1135 (rec.ir_freecount == frec->ir_freecount));
1136 1136
1137 error = xfs_inobt_update(cur, &rec); 1137 return xfs_inobt_update(cur, &rec);
1138 if (error)
1139 return error;
1140
1141 return 0;
1142} 1138}
1143 1139
1144/* 1140/*
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index e2b1a8116f1c..13e974e6a889 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -930,7 +930,6 @@ xfs_file_readdir(
930{ 930{
931 struct inode *inode = file_inode(file); 931 struct inode *inode = file_inode(file);
932 xfs_inode_t *ip = XFS_I(inode); 932 xfs_inode_t *ip = XFS_I(inode);
933 int error;
934 size_t bufsize; 933 size_t bufsize;
935 934
936 /* 935 /*
@@ -947,10 +946,7 @@ xfs_file_readdir(
947 */ 946 */
948 bufsize = (size_t)min_t(loff_t, 32768, ip->i_d.di_size); 947 bufsize = (size_t)min_t(loff_t, 32768, ip->i_d.di_size);
949 948
950 error = xfs_readdir(ip, ctx, bufsize); 949 return xfs_readdir(ip, ctx, bufsize);
951 if (error)
952 return error;
953 return 0;
954} 950}
955 951
956STATIC int 952STATIC int
diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index 26d4a8d89dfa..79fb19dd9c83 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -1747,23 +1747,21 @@ xfs_qm_vop_dqalloc(
1747 xfs_iunlock(ip, lockflags); 1747 xfs_iunlock(ip, lockflags);
1748 if (O_udqpp) 1748 if (O_udqpp)
1749 *O_udqpp = uq; 1749 *O_udqpp = uq;
1750 else if (uq) 1750 else
1751 xfs_qm_dqrele(uq); 1751 xfs_qm_dqrele(uq);
1752 if (O_gdqpp) 1752 if (O_gdqpp)
1753 *O_gdqpp = gq; 1753 *O_gdqpp = gq;
1754 else if (gq) 1754 else
1755 xfs_qm_dqrele(gq); 1755 xfs_qm_dqrele(gq);
1756 if (O_pdqpp) 1756 if (O_pdqpp)
1757 *O_pdqpp = pq; 1757 *O_pdqpp = pq;
1758 else if (pq) 1758 else
1759 xfs_qm_dqrele(pq); 1759 xfs_qm_dqrele(pq);
1760 return 0; 1760 return 0;
1761 1761
1762error_rele: 1762error_rele:
1763 if (gq) 1763 xfs_qm_dqrele(gq);
1764 xfs_qm_dqrele(gq); 1764 xfs_qm_dqrele(uq);
1765 if (uq)
1766 xfs_qm_dqrele(uq);
1767 return error; 1765 return error;
1768} 1766}
1769 1767
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index ebd99ea4543a..fee11c867da4 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -793,8 +793,7 @@ xfs_open_devices(
793 out_free_ddev_targ: 793 out_free_ddev_targ:
794 xfs_free_buftarg(mp, mp->m_ddev_targp); 794 xfs_free_buftarg(mp, mp->m_ddev_targp);
795 out_close_rtdev: 795 out_close_rtdev:
796 if (rtdev) 796 xfs_blkdev_put(rtdev);
797 xfs_blkdev_put(rtdev);
798 out_close_logdev: 797 out_close_logdev:
799 if (logdev && logdev != ddev) 798 if (logdev && logdev != ddev)
800 xfs_blkdev_put(logdev); 799 xfs_blkdev_put(logdev);