From: tappro Date: Sun, 8 Oct 2006 14:41:08 +0000 (+0000) Subject: update time only if there was no error X-Git-Tag: v1_8_0_110~486^2~640 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=be5ca34afc0b6cfe1ac302296daa08fdc55bdf41;p=fs%2Flustre-release.git update time only if there was no error --- diff --git a/lustre/llite/namei.c b/lustre/llite/namei.c index 5af6af8..8ee7478 100644 --- a/lustre/llite/namei.c +++ b/lustre/llite/namei.c @@ -979,13 +979,14 @@ static int ll_mkdir_generic(struct inode *dir, struct qstr *name, current->fsuid, current->fsgid, current->cap_effective, 0, &request); ll_finish_md_op_data(op_data); - ll_update_times(request, REPLY_REC_OFF, dir); - if (!err && dchild) { - err = ll_prep_inode(&inode, request, REPLY_REC_OFF, - dchild->d_sb); - if (err) - GOTO(out, err); - d_instantiate(dchild, inode); + if (err == 0) { + ll_update_times(request, REPLY_REC_OFF, dir); + if (dchild) { + err = ll_prep_inode(&inode, request, REPLY_REC_OFF, + dchild->d_sb); + if (err == 0) + d_instantiate(dchild, inode); + } } EXIT; out: