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.

Merge tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull misc vfs cleanups from Al Viro:
"Two unrelated patches - one is a removal of long-obsolete include in
overlayfs (it used to need fs/internal.h, but the extern it wanted has
been moved back to include/linux/namei.h) and another introduces
convenience helper constructing struct qstr by a NUL-terminated
string"

* tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
add a string-to-qstr constructor
fs/overlayfs/namei.c: get rid of include ../internal.h

+13 -24
+2 -2
fs/anon_inodes.c
··· 60 60 const struct inode *context_inode) 61 61 { 62 62 struct inode *inode; 63 - const struct qstr qname = QSTR_INIT(name, strlen(name)); 64 63 int error; 65 64 66 65 inode = alloc_anon_inode(anon_inode_mnt->mnt_sb); 67 66 if (IS_ERR(inode)) 68 67 return inode; 69 68 inode->i_flags &= ~S_PRIVATE; 70 - error = security_inode_init_security_anon(inode, &qname, context_inode); 69 + error = security_inode_init_security_anon(inode, &QSTR(name), 70 + context_inode); 71 71 if (error) { 72 72 iput(inode); 73 73 return ERR_PTR(error);
+1 -1
fs/bcachefs/fsck.c
··· 450 450 return ret; 451 451 452 452 struct bch_hash_info dir_hash = bch2_hash_info_init(c, &lostfound); 453 - struct qstr name = (struct qstr) QSTR(name_buf); 453 + struct qstr name = QSTR(name_buf); 454 454 455 455 inode->bi_dir = lostfound.bi_inum; 456 456
-1
fs/bcachefs/recovery.c
··· 32 32 #include <linux/sort.h> 33 33 #include <linux/stat.h> 34 34 35 - #define QSTR(n) { { { .len = strlen(n) } }, .name = n } 36 35 37 36 int bch2_btree_lost_data(struct bch_fs *c, enum btree_id btree) 38 37 {
-2
fs/bcachefs/util.h
··· 670 670 671 671 #include <linux/uuid.h> 672 672 673 - #define QSTR(n) { { { .len = strlen(n) } }, .name = n } 674 - 675 673 static inline bool qstr_eq(const struct qstr l, const struct qstr r) 676 674 { 677 675 return l.len == r.len && !memcmp(l.name, r.name, l.len);
+1 -1
fs/erofs/xattr.c
··· 407 407 } 408 408 409 409 it.index = index; 410 - it.name = (struct qstr)QSTR_INIT(name, strlen(name)); 410 + it.name = QSTR(name); 411 411 if (it.name.len > EROFS_NAME_LEN) 412 412 return -ERANGE; 413 413
+1 -3
fs/file_table.c
··· 351 351 static inline int alloc_path_pseudo(const char *name, struct inode *inode, 352 352 struct vfsmount *mnt, struct path *path) 353 353 { 354 - struct qstr this = QSTR_INIT(name, strlen(name)); 355 - 356 - path->dentry = d_alloc_pseudo(mnt->mnt_sb, &this); 354 + path->dentry = d_alloc_pseudo(mnt->mnt_sb, &QSTR(name)); 357 355 if (!path->dentry) 358 356 return -ENOMEM; 359 357 path->mnt = mntget(mnt);
+1 -1
fs/kernfs/file.c
··· 927 927 if (!inode) 928 928 continue; 929 929 930 - name = (struct qstr)QSTR_INIT(kn->name, strlen(kn->name)); 930 + name = QSTR(kn->name); 931 931 parent = kernfs_get_parent(kn); 932 932 if (parent) { 933 933 p_inode = ilookup(info->sb, kernfs_ino(parent));
-2
fs/overlayfs/namei.c
··· 14 14 #include <linux/exportfs.h> 15 15 #include "overlayfs.h" 16 16 17 - #include "../internal.h" /* for vfs_path_lookup */ 18 - 19 17 struct ovl_lookup_data { 20 18 struct super_block *sb; 21 19 const struct ovl_layer *layer;
+1
include/linux/dcache.h
··· 57 57 }; 58 58 59 59 #define QSTR_INIT(n,l) { { { .len = l } }, .name = n } 60 + #define QSTR(n) (struct qstr)QSTR_INIT(n, strlen(n)) 60 61 61 62 extern const struct qstr empty_name; 62 63 extern const struct qstr slash_name;
+1 -2
mm/secretmem.c
··· 195 195 struct file *file; 196 196 struct inode *inode; 197 197 const char *anon_name = "[secretmem]"; 198 - const struct qstr qname = QSTR_INIT(anon_name, strlen(anon_name)); 199 198 int err; 200 199 201 200 inode = alloc_anon_inode(secretmem_mnt->mnt_sb); 202 201 if (IS_ERR(inode)) 203 202 return ERR_CAST(inode); 204 203 205 - err = security_inode_init_security_anon(inode, &qname, NULL); 204 + err = security_inode_init_security_anon(inode, &QSTR(anon_name), NULL); 206 205 if (err) { 207 206 file = ERR_PTR(err); 208 207 goto err_free_inode;
+5 -9
net/sunrpc/rpc_pipe.c
··· 630 630 static struct dentry *__rpc_lookup_create_exclusive(struct dentry *parent, 631 631 const char *name) 632 632 { 633 - struct qstr q = QSTR_INIT(name, strlen(name)); 633 + struct qstr q = QSTR(name); 634 634 struct dentry *dentry = d_hash_and_lookup(parent, &q); 635 635 if (!dentry) { 636 636 dentry = d_alloc(parent, &q); ··· 1190 1190 struct dentry *rpc_d_lookup_sb(const struct super_block *sb, 1191 1191 const unsigned char *dir_name) 1192 1192 { 1193 - struct qstr dir = QSTR_INIT(dir_name, strlen(dir_name)); 1194 - return d_hash_and_lookup(sb->s_root, &dir); 1193 + return d_hash_and_lookup(sb->s_root, &QSTR(dir_name)); 1195 1194 } 1196 1195 EXPORT_SYMBOL_GPL(rpc_d_lookup_sb); 1197 1196 ··· 1299 1300 struct dentry *gssd_dentry; 1300 1301 struct dentry *clnt_dentry = NULL; 1301 1302 struct dentry *pipe_dentry = NULL; 1302 - struct qstr q = QSTR_INIT(files[RPCAUTH_gssd].name, 1303 - strlen(files[RPCAUTH_gssd].name)); 1304 1303 1305 1304 /* We should never get this far if "gssd" doesn't exist */ 1306 - gssd_dentry = d_hash_and_lookup(root, &q); 1305 + gssd_dentry = d_hash_and_lookup(root, &QSTR(files[RPCAUTH_gssd].name)); 1307 1306 if (!gssd_dentry) 1308 1307 return ERR_PTR(-ENOENT); 1309 1308 ··· 1311 1314 goto out; 1312 1315 } 1313 1316 1314 - q.name = gssd_dummy_clnt_dir[0].name; 1315 - q.len = strlen(gssd_dummy_clnt_dir[0].name); 1316 - clnt_dentry = d_hash_and_lookup(gssd_dentry, &q); 1317 + clnt_dentry = d_hash_and_lookup(gssd_dentry, 1318 + &QSTR(gssd_dummy_clnt_dir[0].name)); 1317 1319 if (!clnt_dentry) { 1318 1320 __rpc_depopulate(gssd_dentry, gssd_dummy_clnt_dir, 0, 1); 1319 1321 pipe_dentry = ERR_PTR(-ENOENT);