summaryrefslogtreecommitdiffstats
path: root/fs/afs/super.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2019-04-25 09:26:51 -0400
committerDavid Howells <dhowells@redhat.com>2019-04-25 09:26:51 -0400
commit79ddbfa500b37a94fa7501e65ebdd5c0e4c7592d (patch)
tree1521d6e9276078aaf142ea40ab0f1e156c0fc276 /fs/afs/super.c
parent99987c560046ea178eb5aea793043deea255f185 (diff)
afs: Implement sillyrename for unlink and rename
Implement sillyrename for AFS unlink and rename, using the NFS variant implementation as a basis. Note that the asynchronous file locking extender/releaser has to be notified with a state change to stop it complaining if there's a race between that and the actual file deletion. A tracepoint, afs_silly_rename, is also added to note the silly rename and the cleanup. The afs_edit_dir tracepoint is given some extra reason indicators and the afs_flock_ev tracepoint is given a silly-delete file lock cancellation indicator. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/super.c')
-rw-r--r--fs/afs/super.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/afs/super.c b/fs/afs/super.c
index 5adf012b8e27..6438849a75c4 100644
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@ -45,7 +45,7 @@ struct file_system_type afs_fs_type = {
45 .init_fs_context = afs_init_fs_context, 45 .init_fs_context = afs_init_fs_context,
46 .parameters = &afs_fs_parameters, 46 .parameters = &afs_fs_parameters,
47 .kill_sb = afs_kill_super, 47 .kill_sb = afs_kill_super,
48 .fs_flags = 0, 48 .fs_flags = FS_RENAME_DOES_D_MOVE,
49}; 49};
50MODULE_ALIAS_FS("afs"); 50MODULE_ALIAS_FS("afs");
51 51
@@ -656,6 +656,8 @@ static struct inode *afs_alloc_inode(struct super_block *sb)
656 vnode->cb_type = 0; 656 vnode->cb_type = 0;
657 vnode->lock_state = AFS_VNODE_LOCK_NONE; 657 vnode->lock_state = AFS_VNODE_LOCK_NONE;
658 658
659 init_rwsem(&vnode->rmdir_lock);
660
659 _leave(" = %p", &vnode->vfs_inode); 661 _leave(" = %p", &vnode->vfs_inode);
660 return &vnode->vfs_inode; 662 return &vnode->vfs_inode;
661} 663}