aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_fsops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_fsops.c')
-rw-r--r--fs/xfs/xfs_fsops.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
index d2295561570a..4334638b7b83 100644
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -168,7 +168,7 @@ xfs_growfs_data_private(
168 nb = in->newblocks; 168 nb = in->newblocks;
169 pct = in->imaxpct; 169 pct = in->imaxpct;
170 if (nb < mp->m_sb.sb_dblocks || pct < 0 || pct > 100) 170 if (nb < mp->m_sb.sb_dblocks || pct < 0 || pct > 100)
171 return XFS_ERROR(EINVAL); 171 return EINVAL;
172 if ((error = xfs_sb_validate_fsb_count(&mp->m_sb, nb))) 172 if ((error = xfs_sb_validate_fsb_count(&mp->m_sb, nb)))
173 return error; 173 return error;
174 dpct = pct - mp->m_sb.sb_imax_pct; 174 dpct = pct - mp->m_sb.sb_imax_pct;
@@ -191,7 +191,7 @@ xfs_growfs_data_private(
191 nagcount--; 191 nagcount--;
192 nb = (xfs_rfsblock_t)nagcount * mp->m_sb.sb_agblocks; 192 nb = (xfs_rfsblock_t)nagcount * mp->m_sb.sb_agblocks;
193 if (nb < mp->m_sb.sb_dblocks) 193 if (nb < mp->m_sb.sb_dblocks)
194 return XFS_ERROR(EINVAL); 194 return EINVAL;
195 } 195 }
196 new = nb - mp->m_sb.sb_dblocks; 196 new = nb - mp->m_sb.sb_dblocks;
197 oagcount = mp->m_sb.sb_agcount; 197 oagcount = mp->m_sb.sb_agcount;
@@ -576,17 +576,17 @@ xfs_growfs_log_private(
576 576
577 nb = in->newblocks; 577 nb = in->newblocks;
578 if (nb < XFS_MIN_LOG_BLOCKS || nb < XFS_B_TO_FSB(mp, XFS_MIN_LOG_BYTES)) 578 if (nb < XFS_MIN_LOG_BLOCKS || nb < XFS_B_TO_FSB(mp, XFS_MIN_LOG_BYTES))
579 return XFS_ERROR(EINVAL); 579 return EINVAL;
580 if (nb == mp->m_sb.sb_logblocks && 580 if (nb == mp->m_sb.sb_logblocks &&
581 in->isint == (mp->m_sb.sb_logstart != 0)) 581 in->isint == (mp->m_sb.sb_logstart != 0))
582 return XFS_ERROR(EINVAL); 582 return EINVAL;
583 /* 583 /*
584 * Moving the log is hard, need new interfaces to sync 584 * Moving the log is hard, need new interfaces to sync
585 * the log first, hold off all activity while moving it. 585 * the log first, hold off all activity while moving it.
586 * Can have shorter or longer log in the same space, 586 * Can have shorter or longer log in the same space,
587 * or transform internal to external log or vice versa. 587 * or transform internal to external log or vice versa.
588 */ 588 */
589 return XFS_ERROR(ENOSYS); 589 return ENOSYS;
590} 590}
591 591
592/* 592/*
@@ -604,9 +604,9 @@ xfs_growfs_data(
604 int error; 604 int error;
605 605
606 if (!capable(CAP_SYS_ADMIN)) 606 if (!capable(CAP_SYS_ADMIN))
607 return XFS_ERROR(EPERM); 607 return EPERM;
608 if (!mutex_trylock(&mp->m_growlock)) 608 if (!mutex_trylock(&mp->m_growlock))
609 return XFS_ERROR(EWOULDBLOCK); 609 return EWOULDBLOCK;
610 error = xfs_growfs_data_private(mp, in); 610 error = xfs_growfs_data_private(mp, in);
611 mutex_unlock(&mp->m_growlock); 611 mutex_unlock(&mp->m_growlock);
612 return error; 612 return error;
@@ -620,9 +620,9 @@ xfs_growfs_log(
620 int error; 620 int error;
621 621
622 if (!capable(CAP_SYS_ADMIN)) 622 if (!capable(CAP_SYS_ADMIN))
623 return XFS_ERROR(EPERM); 623 return EPERM;
624 if (!mutex_trylock(&mp->m_growlock)) 624 if (!mutex_trylock(&mp->m_growlock))
625 return XFS_ERROR(EWOULDBLOCK); 625 return EWOULDBLOCK;
626 error = xfs_growfs_log_private(mp, in); 626 error = xfs_growfs_log_private(mp, in);
627 mutex_unlock(&mp->m_growlock); 627 mutex_unlock(&mp->m_growlock);
628 return error; 628 return error;
@@ -818,7 +818,7 @@ xfs_fs_goingdown(
818 SHUTDOWN_FORCE_UMOUNT | SHUTDOWN_LOG_IO_ERROR); 818 SHUTDOWN_FORCE_UMOUNT | SHUTDOWN_LOG_IO_ERROR);
819 break; 819 break;
820 default: 820 default:
821 return XFS_ERROR(EINVAL); 821 return EINVAL;
822 } 822 }
823 823
824 return 0; 824 return 0;