Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'xfs-fixes-for-linus-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs

Pull xfs fix from Dave Chinner:
"This is a fix for an unmount hang (regression) when the filesystem is
shutdown. It was supposed to go to you for -rc3, but I accidentally
tagged the commit prior to it in that pullreq.

Summary:

- fix for aborting deferred transactions on filesystem shutdown"

* tag 'xfs-fixes-for-linus-4.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs:
xfs: defer should abort intent items if the trans roll fails

+5 -12
+5 -12
fs/xfs/libxfs/xfs_defer.c
··· 199 199 struct xfs_defer_pending *dfp; 200 200 201 201 list_for_each_entry(dfp, &dop->dop_intake, dfp_list) { 202 - trace_xfs_defer_intake_work(tp->t_mountp, dfp); 203 202 dfp->dfp_intent = dfp->dfp_type->create_intent(tp, 204 203 dfp->dfp_count); 204 + trace_xfs_defer_intake_work(tp->t_mountp, dfp); 205 205 list_sort(tp->t_mountp, &dfp->dfp_work, 206 206 dfp->dfp_type->diff_items); 207 207 list_for_each(li, &dfp->dfp_work) ··· 221 221 struct xfs_defer_pending *dfp; 222 222 223 223 trace_xfs_defer_trans_abort(tp->t_mountp, dop); 224 - /* 225 - * If the transaction was committed, drop the intent reference 226 - * since we're bailing out of here. The other reference is 227 - * dropped when the intent hits the AIL. If the transaction 228 - * was not committed, the intent is freed by the intent item 229 - * unlock handler on abort. 230 - */ 231 - if (!dop->dop_committed) 232 - return; 233 224 234 - /* Abort intent items. */ 225 + /* Abort intent items that don't have a done item. */ 235 226 list_for_each_entry(dfp, &dop->dop_pending, dfp_list) { 236 227 trace_xfs_defer_pending_abort(tp->t_mountp, dfp); 237 - if (!dfp->dfp_done) 228 + if (dfp->dfp_intent && !dfp->dfp_done) { 238 229 dfp->dfp_type->abort_intent(dfp->dfp_intent); 230 + dfp->dfp_intent = NULL; 231 + } 239 232 } 240 233 241 234 /* Shut down FS. */