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.

rpc_new_dir(): the last argument is always NULL

All callers except the one in rpc_populate() pass explicit NULL
there; rpc_populate() passes its last argument ('private') instead,
but in the only call of rpc_populate() that creates any subdirectories
(when creating fixed subdirectories of root) private itself is NULL.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro db83fa91 805060a6

+6 -9
+6 -9
net/sunrpc/rpc_pipe.c
··· 552 552 553 553 static struct dentry *rpc_new_dir(struct dentry *parent, 554 554 const char *name, 555 - umode_t mode, 556 - void *private) 555 + umode_t mode) 557 556 { 558 557 struct dentry *dentry = simple_start_creating(parent, name); 559 558 struct inode *dir = parent->d_inode; ··· 569 570 } 570 571 571 572 inode->i_ino = iunique(dir->i_sb, 100); 572 - rpc_inode_setowner(inode, private); 573 573 inc_nlink(dir); 574 574 d_instantiate(dentry, inode); 575 575 fsnotify_mkdir(dir, dentry); ··· 601 603 case S_IFDIR: 602 604 dentry = rpc_new_dir(parent, 603 605 files[i].name, 604 - files[i].mode, 605 - private); 606 + files[i].mode); 606 607 if (IS_ERR(dentry)) { 607 608 err = PTR_ERR(dentry); 608 609 goto out_bad; ··· 883 886 struct dentry *ret; 884 887 int error; 885 888 886 - ret = rpc_new_dir(dentry, name, 0555, NULL); 889 + ret = rpc_new_dir(dentry, name, 0555); 887 890 if (IS_ERR(ret)) 888 891 return ret; 889 892 error = rpc_populate(ret, authfiles, RPCAUTH_info, RPCAUTH_EOF, ··· 936 939 { 937 940 struct dentry *dentry; 938 941 939 - dentry = rpc_new_dir(parent, name, umode, NULL); 942 + dentry = rpc_new_dir(parent, name, umode); 940 943 if (!IS_ERR(dentry)) { 941 944 int error = rpc_populate(dentry, cache_pipefs_files, 0, 3, cd); 942 945 if (error) { ··· 1112 1115 struct dentry *gssd_dentry, *clnt_dentry; 1113 1116 int err; 1114 1117 1115 - gssd_dentry = rpc_new_dir(root, "gssd", 0555, NULL); 1118 + gssd_dentry = rpc_new_dir(root, "gssd", 0555); 1116 1119 if (IS_ERR(gssd_dentry)) 1117 1120 return -ENOENT; 1118 1121 1119 - clnt_dentry = rpc_new_dir(gssd_dentry, "clntXX", 0555, NULL); 1122 + clnt_dentry = rpc_new_dir(gssd_dentry, "clntXX", 0555); 1120 1123 if (IS_ERR(clnt_dentry)) 1121 1124 return -ENOENT; 1122 1125