* assume that holding its ILOCK will suffice to coordinate
* with any rt intent chains involving this inode.
*/
- if (sc->ip && !xfs_is_metadata_inode(sc->ip)) {
- sr->rtlock_flags = rtglock_flags;
- return 0;
- }
+ if (sc->ip && !xfs_is_metadata_inode(sc->ip))
+ break;
/*
* Decide if the rt group is quiet enough for all metadata to
* Obviously, this should be slanted against scrub and in favor
* of runtime threads.
*/
- if (!xfs_rtgroup_intent_busy(sr->rtg)) {
- sr->rtlock_flags = rtglock_flags;
- return 0;
- }
+ if (!xfs_rtgroup_intent_busy(sr->rtg))
+ break;
xfs_rtgroup_unlock(sr->rtg, rtglock_flags);
if (!(sc->flags & XCHK_FSGATES_DRAIN))
return -ECHRNG;
error = xfs_rtgroup_intent_drain(sr->rtg);
- if (error == -ERESTARTSYS)
- error = -EINTR;
- } while (!error);
+ if (error) {
+ if (error == -ERESTARTSYS)
+ error = -EINTR;
+ return error;
+ }
+ } while (1);
- return error;
+ sr->rtlock_flags = rtglock_flags;
+ return 0;
}
/*