X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=fs%2Fxfs%2Fxfs_log_cil.c;h=a844f77d2cc3e199a9959ddb7eb4d9c8df6c9ee1;hb=d420e5c810bce5debce0238021b410d0ef99cf08;hp=cfe97973ba36d1d586c3704b536aebce2e391af1;hpb=75acebf2423ab13ff6198daa6e17ef7a2543bfe4;p=deliverable%2Flinux.git diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c index cfe97973ba36..a844f77d2cc3 100644 --- a/fs/xfs/xfs_log_cil.c +++ b/fs/xfs/xfs_log_cil.c @@ -17,7 +17,7 @@ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_types.h" +#include "xfs_shared.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_trans_priv.h" @@ -711,6 +711,20 @@ xlog_cil_push_foreground( xlog_cil_push(log); } +bool +xlog_cil_empty( + struct xlog *log) +{ + struct xfs_cil *cil = log->l_cilp; + bool empty = false; + + spin_lock(&cil->xc_push_lock); + if (list_empty(&cil->xc_cil)) + empty = true; + spin_unlock(&cil->xc_push_lock); + return empty; +} + /* * Commit a transaction with the given vector to the Committed Item List. *