[BUG] mtime&ctime updated when it should not

From: Jan Kara
Date: Mon Sep 01 2003 - 13:13:39 EST


Hello,

one user pointed my attention to the fact that when the write fails
(for example when the user quota is exceeded) the modification time is
still updated (the problem appears both in 2.4 and 2.6). According to
SUSv3 that should not happen because the specification says that mtime
and ctime should be marked for update upon a successful completition
of a write (not that it would forbid updating the times in other cases
but I find it at least a bit nonintuitive).
The easiest fix would be probably to "backup" the times at the
beginning of the write and restore the original values when the write
fails (simply not updating the times would require more surgery because
for example vmtruncate() is called when the write fails and it also
updates the times).
So should I write the patch or is the current behaviour considered
correct?

Honza

--
Jan Kara <jack@xxxxxxx>
SuSE CR Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/