]> git.baikalelectronics.ru Git - kernel.git/commit
nilfs2: disallow remount of snapshot from/to a regular mount
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Sun, 9 May 2010 12:51:53 +0000 (21:51 +0900)
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Mon, 10 May 2010 02:32:34 +0000 (11:32 +0900)
commit6674d04d0820281d7744aae05194601a3ece8896
tree3c9133ae5b349aeec8c0a93338b9dd13b9c9dac1
parentf17b0be3519ac26cddaf3ba669f764d0af72c2bb
nilfs2: disallow remount of snapshot from/to a regular mount

Snapshots and regular ro/rw mounts are essentially-different within
the meaning whether the checkpoint is static or not and is marked with
a snapshot flag or not.

The current implemenation, however, allows to remount a snapshot to a
regular rw-mount if the checkpoint number equals the latest one.

This transition is actually impossible since changing a checkpoint to
a snapshot makes another checkpoint, thus the condition is never
satisfied.

This fixes the weird state of affairs, and specifically separates
snapshots and regular rw/ro-mounts.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
fs/nilfs2/super.c