From 02df4c0226ca75cebf5f951b331699b98c96a644 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 28 Aug 2005 17:57:15 +0000 Subject: [PATCH] - fill io epoch in MDS_CLOSE only if file is writtable --- lustre/llite/file.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lustre/llite/file.c b/lustre/llite/file.c index c6a7058..fd24def 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -154,7 +154,7 @@ int ll_md_real_close(struct obd_export *md_exp, int freeing = inode->i_state & I_FREEING; struct obd_client_handle **och_p; struct obd_client_handle *och; - __u64 *och_usecount, epoch; + __u64 *och_usecount, epoch = 0; int rc = 0, dirty = 0; ENTRY; @@ -199,8 +199,10 @@ int ll_md_real_close(struct obd_export *md_exp, och = *och_p; *och_p = NULL; - epoch = lli->lli_io_epoch; - lli->lli_io_epoch = 0; + if (flags & FMODE_WRITE) { + epoch = lli->lli_io_epoch; + lli->lli_io_epoch = 0; + } up(&lli->lli_och_sem); -- 1.8.3.1