aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/xfs_fsops.c8
-rw-r--r--fs/xfs/xfs_mount.c4
-rw-r--r--fs/xfs/xfs_mount.h2
3 files changed, 7 insertions, 7 deletions
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
index 94bd9f2d9d77..c92d5b821029 100644
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -433,10 +433,10 @@ xfs_growfs_data(
433 xfs_growfs_data_t *in) 433 xfs_growfs_data_t *in)
434{ 434{
435 int error; 435 int error;
436 if (!cpsema(&mp->m_growlock)) 436 if (!mutex_trylock(&mp->m_growlock))
437 return XFS_ERROR(EWOULDBLOCK); 437 return XFS_ERROR(EWOULDBLOCK);
438 error = xfs_growfs_data_private(mp, in); 438 error = xfs_growfs_data_private(mp, in);
439 vsema(&mp->m_growlock); 439 mutex_unlock(&mp->m_growlock);
440 return error; 440 return error;
441} 441}
442 442
@@ -446,10 +446,10 @@ xfs_growfs_log(
446 xfs_growfs_log_t *in) 446 xfs_growfs_log_t *in)
447{ 447{
448 int error; 448 int error;
449 if (!cpsema(&mp->m_growlock)) 449 if (!mutex_trylock(&mp->m_growlock))
450 return XFS_ERROR(EWOULDBLOCK); 450 return XFS_ERROR(EWOULDBLOCK);
451 error = xfs_growfs_log_private(mp, in); 451 error = xfs_growfs_log_private(mp, in);
452 vsema(&mp->m_growlock); 452 mutex_unlock(&mp->m_growlock);
453 return error; 453 return error;
454} 454}
455 455
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index ba8df2f0dd4f..ebdb76da527c 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -139,7 +139,7 @@ xfs_mount_init(void)
139 AIL_LOCKINIT(&mp->m_ail_lock, "xfs_ail"); 139 AIL_LOCKINIT(&mp->m_ail_lock, "xfs_ail");
140 spinlock_init(&mp->m_sb_lock, "xfs_sb"); 140 spinlock_init(&mp->m_sb_lock, "xfs_sb");
141 mutex_init(&mp->m_ilock); 141 mutex_init(&mp->m_ilock);
142 initnsema(&mp->m_growlock, 1, "xfs_grow"); 142 mutex_init(&mp->m_growlock);
143 /* 143 /*
144 * Initialize the AIL. 144 * Initialize the AIL.
145 */ 145 */
@@ -174,7 +174,7 @@ xfs_mount_free(
174 AIL_LOCK_DESTROY(&mp->m_ail_lock); 174 AIL_LOCK_DESTROY(&mp->m_ail_lock);
175 spinlock_destroy(&mp->m_sb_lock); 175 spinlock_destroy(&mp->m_sb_lock);
176 mutex_destroy(&mp->m_ilock); 176 mutex_destroy(&mp->m_ilock);
177 freesema(&mp->m_growlock); 177 mutex_destroy(&mp->m_growlock);
178 if (mp->m_quotainfo) 178 if (mp->m_quotainfo)
179 XFS_QM_DONE(mp); 179 XFS_QM_DONE(mp);
180 180
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index 7f671f8269b4..c618f7cb5f0e 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -384,7 +384,7 @@ typedef struct xfs_mount {
384 uint m_in_maxlevels; /* XFS_IN_MAXLEVELS */ 384 uint m_in_maxlevels; /* XFS_IN_MAXLEVELS */
385 struct xfs_perag *m_perag; /* per-ag accounting info */ 385 struct xfs_perag *m_perag; /* per-ag accounting info */
386 struct rw_semaphore m_peraglock; /* lock for m_perag (pointer) */ 386 struct rw_semaphore m_peraglock; /* lock for m_perag (pointer) */
387 sema_t m_growlock; /* growfs mutex */ 387 struct mutex m_growlock; /* growfs mutex */
388 int m_fixedfsid[2]; /* unchanged for life of FS */ 388 int m_fixedfsid[2]; /* unchanged for life of FS */
389 uint m_dmevmask; /* DMI events for this FS */ 389 uint m_dmevmask; /* DMI events for this FS */
390 __uint64_t m_flags; /* global mount flags */ 390 __uint64_t m_flags; /* global mount flags */