From: NeilBrown Date: Wed, 17 Jun 2009 22:48:19 +0000 (+1000) Subject: md: move assignment of ->utime so that it never gets skipped. X-Git-Tag: firefly_0821_release~13733^2~7 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1b57f132231593923cb4ab99943ddd777e8745bc;p=firefly-linux-kernel-4.4.55.git md: move assignment of ->utime so that it never gets skipped. Currently the assignment to utime gets skipped for 'external' metadata. So move it to the top of the function so that it always gets effected. This is of largely cosmetic interest. Nothing actually depends on ->utime being right for external arrays. "mdadm --monitor" does use it for 0.90 and 1.x arrays, but with mdadm-3.0, this is not important for external metadata. Signed-off-by: NeilBrown --- diff --git a/drivers/md/md.c b/drivers/md/md.c index 90147370bfd7..d9cce54cc2d5 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -1904,6 +1904,7 @@ static void md_update_sb(mddev_t * mddev, int force_change) int sync_req; int nospares = 0; + mddev->utime = get_seconds(); if (mddev->external) return; repeat: @@ -1933,7 +1934,6 @@ repeat: nospares = 0; sync_req = mddev->in_sync; - mddev->utime = get_seconds(); /* If this is just a dirty<->clean transition, and the array is clean * and 'events' is odd, we can roll back to the previous clean state */