summaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/namei.c
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-08-15 23:33:57 +0900
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-10-23 09:24:35 +0900
commitdc3d3b810a644dfa329efaa230cd514226f8981d (patch)
treee0a2c2bfb3edb6b1fa4383cb2d1f52adb653c9e2 /fs/nilfs2/namei.c
parentfd52202930b7e8db48bee5a6fc6b1f438e822a23 (diff)
downloadop-kernel-dev-dc3d3b810a644dfa329efaa230cd514226f8981d.zip
op-kernel-dev-dc3d3b810a644dfa329efaa230cd514226f8981d.tar.gz
nilfs2: deny write access to inodes in snapshots
Snapshots of nilfs are read-only. After super block instances (sb) will be unified, nilfs will need to check write access by a way other than implicit test with IS_RDONLY(inode). This is because IS_RDONLY() refers to MS_RDONLY bit of inode->i_sb->s_flags and it will become inaccurate after the unification of sb. To prepare for the issue, this uses i_op->permission to deny write access to inodes in snapshots. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/namei.c')
-rw-r--r--fs/nilfs2/namei.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nilfs2/namei.c b/fs/nilfs2/namei.c
index a65f465..185d160 100644
--- a/fs/nilfs2/namei.c
+++ b/fs/nilfs2/namei.c
@@ -588,6 +588,7 @@ const struct inode_operations nilfs_symlink_inode_operations = {
.readlink = generic_readlink,
.follow_link = page_follow_link_light,
.put_link = page_put_link,
+ .permission = nilfs_permission,
};
const struct export_operations nilfs_export_ops = {
OpenPOWER on IntegriCloud