aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_sync.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_sync.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c
index 961df0a22c78..6fed97a8cd3e 100644
--- a/fs/xfs/linux-2.6/xfs_sync.c
+++ b/fs/xfs/linux-2.6/xfs_sync.c
@@ -44,6 +44,7 @@
44#include "xfs_inode_item.h" 44#include "xfs_inode_item.h"
45#include "xfs_rw.h" 45#include "xfs_rw.h"
46#include "xfs_quota.h" 46#include "xfs_quota.h"
47#include "xfs_trace.h"
47 48
48#include <linux/kthread.h> 49#include <linux/kthread.h>
49#include <linux/freezer.h> 50#include <linux/freezer.h>
@@ -663,10 +664,9 @@ xfs_syncd_stop(
663 kthread_stop(mp->m_sync_task); 664 kthread_stop(mp->m_sync_task);
664} 665}
665 666
666int 667STATIC int
667xfs_reclaim_inode( 668xfs_reclaim_inode(
668 xfs_inode_t *ip, 669 xfs_inode_t *ip,
669 int locked,
670 int sync_mode) 670 int sync_mode)
671{ 671{
672 xfs_perag_t *pag = xfs_get_perag(ip->i_mount, ip->i_ino); 672 xfs_perag_t *pag = xfs_get_perag(ip->i_mount, ip->i_ino);
@@ -682,10 +682,6 @@ xfs_reclaim_inode(
682 !__xfs_iflags_test(ip, XFS_IRECLAIMABLE)) { 682 !__xfs_iflags_test(ip, XFS_IRECLAIMABLE)) {
683 spin_unlock(&ip->i_flags_lock); 683 spin_unlock(&ip->i_flags_lock);
684 write_unlock(&pag->pag_ici_lock); 684 write_unlock(&pag->pag_ici_lock);
685 if (locked) {
686 xfs_ifunlock(ip);
687 xfs_iunlock(ip, XFS_ILOCK_EXCL);
688 }
689 return -EAGAIN; 685 return -EAGAIN;
690 } 686 }
691 __xfs_iflags_set(ip, XFS_IRECLAIM); 687 __xfs_iflags_set(ip, XFS_IRECLAIM);
@@ -704,10 +700,8 @@ xfs_reclaim_inode(
704 * We get the flush lock regardless, though, just to make sure 700 * We get the flush lock regardless, though, just to make sure
705 * we don't free it while it is being flushed. 701 * we don't free it while it is being flushed.
706 */ 702 */
707 if (!locked) { 703 xfs_ilock(ip, XFS_ILOCK_EXCL);
708 xfs_ilock(ip, XFS_ILOCK_EXCL); 704 xfs_iflock(ip);
709 xfs_iflock(ip);
710 }
711 705
712 /* 706 /*
713 * In the case of a forced shutdown we rely on xfs_iflush() to 707 * In the case of a forced shutdown we rely on xfs_iflush() to
@@ -778,7 +772,7 @@ xfs_reclaim_inode_now(
778 } 772 }
779 read_unlock(&pag->pag_ici_lock); 773 read_unlock(&pag->pag_ici_lock);
780 774
781 return xfs_reclaim_inode(ip, 0, flags); 775 return xfs_reclaim_inode(ip, flags);
782} 776}
783 777
784int 778int