diff options
Diffstat (limited to 'fs/xfs/xfs_filestream.c')
-rw-r--r-- | fs/xfs/xfs_filestream.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/xfs/xfs_filestream.c b/fs/xfs/xfs_filestream.c index e61f2aa088a9..914d00d0f119 100644 --- a/fs/xfs/xfs_filestream.c +++ b/fs/xfs/xfs_filestream.c | |||
@@ -253,8 +253,7 @@ next_ag: | |||
253 | 253 | ||
254 | /* | 254 | /* |
255 | * Set the allocation group number for a file or a directory, updating inode | 255 | * Set the allocation group number for a file or a directory, updating inode |
256 | * references and per-AG references as appropriate. Must be called with the | 256 | * references and per-AG references as appropriate. |
257 | * m_peraglock held in read mode. | ||
258 | */ | 257 | */ |
259 | static int | 258 | static int |
260 | _xfs_filestream_update_ag( | 259 | _xfs_filestream_update_ag( |
@@ -456,10 +455,10 @@ xfs_filestream_unmount( | |||
456 | } | 455 | } |
457 | 456 | ||
458 | /* | 457 | /* |
459 | * If the mount point's m_perag array is going to be reallocated, all | 458 | * If the mount point's m_perag tree is going to be modified, all |
460 | * outstanding cache entries must be flushed to avoid accessing reference count | 459 | * outstanding cache entries must be flushed to avoid accessing reference count |
461 | * addresses that have been freed. The call to xfs_filestream_flush() must be | 460 | * addresses that have been freed. The call to xfs_filestream_flush() must be |
462 | * made inside the block that holds the m_peraglock in write mode to do the | 461 | * made inside the block that holds the m_perag_lock in write mode to do the |
463 | * reallocation. | 462 | * reallocation. |
464 | */ | 463 | */ |
465 | void | 464 | void |
@@ -531,7 +530,6 @@ xfs_filestream_associate( | |||
531 | 530 | ||
532 | mp = pip->i_mount; | 531 | mp = pip->i_mount; |
533 | cache = mp->m_filestream; | 532 | cache = mp->m_filestream; |
534 | down_read(&mp->m_peraglock); | ||
535 | 533 | ||
536 | /* | 534 | /* |
537 | * We have a problem, Houston. | 535 | * We have a problem, Houston. |
@@ -548,10 +546,8 @@ xfs_filestream_associate( | |||
548 | * | 546 | * |
549 | * So, if we can't get the iolock without sleeping then just give up | 547 | * So, if we can't get the iolock without sleeping then just give up |
550 | */ | 548 | */ |
551 | if (!xfs_ilock_nowait(pip, XFS_IOLOCK_EXCL)) { | 549 | if (!xfs_ilock_nowait(pip, XFS_IOLOCK_EXCL)) |
552 | up_read(&mp->m_peraglock); | ||
553 | return 1; | 550 | return 1; |
554 | } | ||
555 | 551 | ||
556 | /* If the parent directory is already in the cache, use its AG. */ | 552 | /* If the parent directory is already in the cache, use its AG. */ |
557 | item = xfs_mru_cache_lookup(cache, pip->i_ino); | 553 | item = xfs_mru_cache_lookup(cache, pip->i_ino); |
@@ -606,7 +602,6 @@ exit_did_pick: | |||
606 | 602 | ||
607 | exit: | 603 | exit: |
608 | xfs_iunlock(pip, XFS_IOLOCK_EXCL); | 604 | xfs_iunlock(pip, XFS_IOLOCK_EXCL); |
609 | up_read(&mp->m_peraglock); | ||
610 | return -err; | 605 | return -err; |
611 | } | 606 | } |
612 | 607 | ||