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

qstr: constify instances in nfs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro beffb8fe 612645f7

+26 -25
+4 -4
fs/nfs/nfs3proc.c
··· 144 144 } 145 145 146 146 static int 147 - nfs3_proc_lookup(struct inode *dir, struct qstr *name, 147 + nfs3_proc_lookup(struct inode *dir, const struct qstr *name, 148 148 struct nfs_fh *fhandle, struct nfs_fattr *fattr, 149 149 struct nfs4_label *label) 150 150 { ··· 404 404 } 405 405 406 406 static int 407 - nfs3_proc_remove(struct inode *dir, struct qstr *name) 407 + nfs3_proc_remove(struct inode *dir, const struct qstr *name) 408 408 { 409 409 struct nfs_removeargs arg = { 410 410 .fh = NFS_FH(dir), ··· 480 480 } 481 481 482 482 static int 483 - nfs3_proc_link(struct inode *inode, struct inode *dir, struct qstr *name) 483 + nfs3_proc_link(struct inode *inode, struct inode *dir, const struct qstr *name) 484 484 { 485 485 struct nfs3_linkargs arg = { 486 486 .fromfh = NFS_FH(inode), ··· 582 582 } 583 583 584 584 static int 585 - nfs3_proc_rmdir(struct inode *dir, struct qstr *name) 585 + nfs3_proc_rmdir(struct inode *dir, const struct qstr *name) 586 586 { 587 587 struct nfs_fattr *dir_attr; 588 588 struct nfs3_diropargs arg = {
+3 -2
fs/nfs/nfs4_fs.h
··· 224 224 extern struct file_system_type nfs4_fs_type; 225 225 226 226 /* nfs4namespace.c */ 227 - struct rpc_clnt *nfs4_negotiate_security(struct rpc_clnt *, struct inode *, struct qstr *); 227 + struct rpc_clnt *nfs4_negotiate_security(struct rpc_clnt *, struct inode *, 228 + const struct qstr *); 228 229 struct vfsmount *nfs4_submount(struct nfs_server *, struct dentry *, 229 230 struct nfs_fh *, struct nfs_fattr *); 230 231 int nfs4_replace_transport(struct nfs_server *server, ··· 252 251 extern int nfs4_proc_get_locations(struct inode *, struct nfs4_fs_locations *, 253 252 struct page *page, struct rpc_cred *); 254 253 extern int nfs4_proc_fsid_present(struct inode *, struct rpc_cred *); 255 - extern struct rpc_clnt *nfs4_proc_lookup_mountpoint(struct inode *, struct qstr *, 254 + extern struct rpc_clnt *nfs4_proc_lookup_mountpoint(struct inode *, const struct qstr *, 256 255 struct nfs_fh *, struct nfs_fattr *); 257 256 extern int nfs4_proc_secinfo(struct inode *, const struct qstr *, struct nfs4_secinfo_flavors *); 258 257 extern const struct xattr_handler *nfs4_xattr_handlers[];
+2 -2
fs/nfs/nfs4namespace.c
··· 208 208 */ 209 209 struct rpc_clnt * 210 210 nfs4_negotiate_security(struct rpc_clnt *clnt, struct inode *inode, 211 - struct qstr *name) 211 + const struct qstr *name) 212 212 { 213 213 struct page *page; 214 214 struct nfs4_secinfo_flavors *flavors; ··· 397 397 rpc_authflavor_t flavor = server->client->cl_auth->au_flavor; 398 398 struct dentry *parent = dget_parent(dentry); 399 399 struct inode *dir = d_inode(parent); 400 - struct qstr *name = &dentry->d_name; 400 + const struct qstr *name = &dentry->d_name; 401 401 struct rpc_clnt *client; 402 402 struct vfsmount *mnt; 403 403
+8 -8
fs/nfs/nfs4proc.c
··· 3530 3530 } 3531 3531 3532 3532 static int nfs4_proc_lookup_common(struct rpc_clnt **clnt, struct inode *dir, 3533 - struct qstr *name, struct nfs_fh *fhandle, 3533 + const struct qstr *name, struct nfs_fh *fhandle, 3534 3534 struct nfs_fattr *fattr, struct nfs4_label *label) 3535 3535 { 3536 3536 struct nfs4_exception exception = { }; ··· 3572 3572 return err; 3573 3573 } 3574 3574 3575 - static int nfs4_proc_lookup(struct inode *dir, struct qstr *name, 3575 + static int nfs4_proc_lookup(struct inode *dir, const struct qstr *name, 3576 3576 struct nfs_fh *fhandle, struct nfs_fattr *fattr, 3577 3577 struct nfs4_label *label) 3578 3578 { ··· 3588 3588 } 3589 3589 3590 3590 struct rpc_clnt * 3591 - nfs4_proc_lookup_mountpoint(struct inode *dir, struct qstr *name, 3591 + nfs4_proc_lookup_mountpoint(struct inode *dir, const struct qstr *name, 3592 3592 struct nfs_fh *fhandle, struct nfs_fattr *fattr) 3593 3593 { 3594 3594 struct rpc_clnt *client = NFS_CLIENT(dir); ··· 3747 3747 return status; 3748 3748 } 3749 3749 3750 - static int _nfs4_proc_remove(struct inode *dir, struct qstr *name) 3750 + static int _nfs4_proc_remove(struct inode *dir, const struct qstr *name) 3751 3751 { 3752 3752 struct nfs_server *server = NFS_SERVER(dir); 3753 3753 struct nfs_removeargs args = { ··· 3770 3770 return status; 3771 3771 } 3772 3772 3773 - static int nfs4_proc_remove(struct inode *dir, struct qstr *name) 3773 + static int nfs4_proc_remove(struct inode *dir, const struct qstr *name) 3774 3774 { 3775 3775 struct nfs4_exception exception = { }; 3776 3776 int err; ··· 3853 3853 return 1; 3854 3854 } 3855 3855 3856 - static int _nfs4_proc_link(struct inode *inode, struct inode *dir, struct qstr *name) 3856 + static int _nfs4_proc_link(struct inode *inode, struct inode *dir, const struct qstr *name) 3857 3857 { 3858 3858 struct nfs_server *server = NFS_SERVER(inode); 3859 3859 struct nfs4_link_arg arg = { ··· 3900 3900 return status; 3901 3901 } 3902 3902 3903 - static int nfs4_proc_link(struct inode *inode, struct inode *dir, struct qstr *name) 3903 + static int nfs4_proc_link(struct inode *inode, struct inode *dir, const struct qstr *name) 3904 3904 { 3905 3905 struct nfs4_exception exception = { }; 3906 3906 int err; ··· 3922 3922 }; 3923 3923 3924 3924 static struct nfs4_createdata *nfs4_alloc_createdata(struct inode *dir, 3925 - struct qstr *name, struct iattr *sattr, u32 ftype) 3925 + const struct qstr *name, struct iattr *sattr, u32 ftype) 3926 3926 { 3927 3927 struct nfs4_createdata *data; 3928 3928
+4 -4
fs/nfs/proc.c
··· 145 145 } 146 146 147 147 static int 148 - nfs_proc_lookup(struct inode *dir, struct qstr *name, 148 + nfs_proc_lookup(struct inode *dir, const struct qstr *name, 149 149 struct nfs_fh *fhandle, struct nfs_fattr *fattr, 150 150 struct nfs4_label *label) 151 151 { ··· 299 299 } 300 300 301 301 static int 302 - nfs_proc_remove(struct inode *dir, struct qstr *name) 302 + nfs_proc_remove(struct inode *dir, const struct qstr *name) 303 303 { 304 304 struct nfs_removeargs arg = { 305 305 .fh = NFS_FH(dir), ··· 357 357 } 358 358 359 359 static int 360 - nfs_proc_link(struct inode *inode, struct inode *dir, struct qstr *name) 360 + nfs_proc_link(struct inode *inode, struct inode *dir, const struct qstr *name) 361 361 { 362 362 struct nfs_linkargs arg = { 363 363 .fromfh = NFS_FH(inode), ··· 456 456 } 457 457 458 458 static int 459 - nfs_proc_rmdir(struct inode *dir, struct qstr *name) 459 + nfs_proc_rmdir(struct inode *dir, const struct qstr *name) 460 460 { 461 461 struct nfs_diropargs arg = { 462 462 .fh = NFS_FH(dir),
+1 -1
fs/nfs/unlink.c
··· 162 162 * @dentry: dentry to unlink 163 163 */ 164 164 static int 165 - nfs_async_unlink(struct dentry *dentry, struct qstr *name) 165 + nfs_async_unlink(struct dentry *dentry, const struct qstr *name) 166 166 { 167 167 struct nfs_unlinkdata *data; 168 168 int status = -ENOMEM;
+4 -4
include/linux/nfs_xdr.h
··· 1543 1543 struct nfs_fattr *, struct nfs4_label *); 1544 1544 int (*setattr) (struct dentry *, struct nfs_fattr *, 1545 1545 struct iattr *); 1546 - int (*lookup) (struct inode *, struct qstr *, 1546 + int (*lookup) (struct inode *, const struct qstr *, 1547 1547 struct nfs_fh *, struct nfs_fattr *, 1548 1548 struct nfs4_label *); 1549 1549 int (*access) (struct inode *, struct nfs_access_entry *); ··· 1551 1551 unsigned int); 1552 1552 int (*create) (struct inode *, struct dentry *, 1553 1553 struct iattr *, int); 1554 - int (*remove) (struct inode *, struct qstr *); 1554 + int (*remove) (struct inode *, const struct qstr *); 1555 1555 void (*unlink_setup) (struct rpc_message *, struct inode *dir); 1556 1556 void (*unlink_rpc_prepare) (struct rpc_task *, struct nfs_unlinkdata *); 1557 1557 int (*unlink_done) (struct rpc_task *, struct inode *); 1558 1558 void (*rename_setup) (struct rpc_message *msg, struct inode *dir); 1559 1559 void (*rename_rpc_prepare)(struct rpc_task *task, struct nfs_renamedata *); 1560 1560 int (*rename_done) (struct rpc_task *task, struct inode *old_dir, struct inode *new_dir); 1561 - int (*link) (struct inode *, struct inode *, struct qstr *); 1561 + int (*link) (struct inode *, struct inode *, const struct qstr *); 1562 1562 int (*symlink) (struct inode *, struct dentry *, struct page *, 1563 1563 unsigned int, struct iattr *); 1564 1564 int (*mkdir) (struct inode *, struct dentry *, struct iattr *); 1565 - int (*rmdir) (struct inode *, struct qstr *); 1565 + int (*rmdir) (struct inode *, const struct qstr *); 1566 1566 int (*readdir) (struct dentry *, struct rpc_cred *, 1567 1567 u64, struct page **, unsigned int, int); 1568 1568 int (*mknod) (struct inode *, struct dentry *, struct iattr *,