Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

afs_edit_dir_{add,remove}(): constify qstr argument

Nothing outside of fs/dcache.c has any business modifying
dentry names; passing &dentry->d_name as an argument should
have that argument declared as a const pointer.

Reviewed-by: David Howells <dhowells@redhat.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro 3edcd68e 2974831d

+4 -4
+2 -2
fs/afs/dir_edit.c
··· 239 239 * The caller must hold the inode locked. 240 240 */ 241 241 void afs_edit_dir_add(struct afs_vnode *vnode, 242 - struct qstr *name, struct afs_fid *new_fid, 242 + const struct qstr *name, struct afs_fid *new_fid, 243 243 enum afs_edit_dir_reason why) 244 244 { 245 245 union afs_xdr_dir_block *meta, *block; ··· 391 391 * The caller must hold the inode locked. 392 392 */ 393 393 void afs_edit_dir_remove(struct afs_vnode *vnode, 394 - struct qstr *name, enum afs_edit_dir_reason why) 394 + const struct qstr *name, enum afs_edit_dir_reason why) 395 395 { 396 396 union afs_xdr_dir_block *meta, *block, *pblock; 397 397 union afs_xdr_dirent *de, *pde;
+2 -2
fs/afs/internal.h
··· 1097 1097 /* 1098 1098 * dir_edit.c 1099 1099 */ 1100 - extern void afs_edit_dir_add(struct afs_vnode *, struct qstr *, struct afs_fid *, 1100 + extern void afs_edit_dir_add(struct afs_vnode *, const struct qstr *, struct afs_fid *, 1101 1101 enum afs_edit_dir_reason); 1102 - extern void afs_edit_dir_remove(struct afs_vnode *, struct qstr *, enum afs_edit_dir_reason); 1102 + extern void afs_edit_dir_remove(struct afs_vnode *, const struct qstr *, enum afs_edit_dir_reason); 1103 1103 void afs_edit_dir_update_dotdot(struct afs_vnode *vnode, struct afs_vnode *new_dvnode, 1104 1104 enum afs_edit_dir_reason why); 1105 1105 void afs_mkdir_init_dir(struct afs_vnode *dvnode, struct afs_vnode *parent_vnode);