From be5ca34afc0b6cfe1ac302296daa08fdc55bdf41 Mon Sep 17 00:00:00 2001 From: tappro Date: Sun, 8 Oct 2006 14:41:08 +0000 Subject: [PATCH] update time only if there was no error --- lustre/llite/namei.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) 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: -- 1.8.3.1