On 09/19/2013 05:14 PM, m@xxxxxxxx wrote: [...]
For the undeletable directory bug, i was able to reproduce it with 3.10 simply by copying portage on a r4 partition, do ctrl-c during copy and rm -rf it right after.
Unfortunately, I can not reproduce this. Could you please try the attached patch? Does it help? Better, on not important data... Thanks, Edward.
Make reiser4_link(), reiser4_unlink() return error, when REISER4_IMMUTABLE inode flag is set. Signed-off-by: Edward Shishkin <edward.shishkin@xxxxxxxxx> --- fs/reiser4/plugin/inode_ops.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) --- linux-3.11.1.orig/fs/reiser4/plugin/inode_ops.c +++ linux-3.11.1/fs/reiser4/plugin/inode_ops.c @@ -151,8 +151,11 @@ int reiser4_link_common(struct dentry *e assert("nikita-1434", object != NULL); /* check for race with create_object() */ - reiser4_check_immutable(object); - + if (reiser4_inode_get_flag(object, REISER4_IMMUTABLE)) { + context_set_commit_async(ctx); + reiser4_exit_context(ctx); + return RETERR(-E_REPEAT); + } parent_dplug = inode_dir_plugin(parent); memset(&entry, 0, sizeof entry); @@ -876,7 +879,8 @@ static int unlink_check_and_grab(struct fplug = inode_file_plugin(child); /* check for race with create_object() */ - reiser4_check_immutable(child); + if (reiser4_inode_get_flag(child, REISER4_IMMUTABLE)) + return RETERR(-E_REPEAT); /* object being deleted should have stat data */ assert("vs-949", !reiser4_inode_get_flag(child, REISER4_NO_SD));