author | Linus Torvalds <torvalds@linux-foundation.org> | |
Sat, 6 Aug 2016 13:49:02 +0000 (09:49 -0400) | ||
committer | Linus Torvalds <torvalds@linux-foundation.org> | |
Sat, 6 Aug 2016 13:49:02 +0000 (09:49 -0400) |
Pull qstr constification updates from Al Viro:
"Fairly self-contained bunch - surprising lot of places passes struct
qstr * as an argument when const struct qstr * would suffice; it
complicates analysis for no good reason.
I'd prefer to feed that separately from the assorted fixes (those are
in #for-linus and with somewhat trickier topology)"
* 'work.const-qstr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
qstr: constify instances in adfs
qstr: constify instances in lustre
qstr: constify instances in f2fs
qstr: constify instances in ext2
qstr: constify instances in vfat
qstr: constify instances in procfs
qstr: constify instances in fuse
qstr constify instances in fs/dcache.c
qstr: constify instances in nfs
qstr: constify instances in ocfs2
qstr: constify instances in autofs4
qstr: constify instances in hfs
qstr: constify instances in hfsplus
qstr: constify instances in logfs
qstr: constify dentry_init_security
"Fairly self-contained bunch - surprising lot of places passes struct
qstr * as an argument when const struct qstr * would suffice; it
complicates analysis for no good reason.
I'd prefer to feed that separately from the assorted fixes (those are
in #for-linus and with somewhat trickier topology)"
* 'work.const-qstr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
qstr: constify instances in adfs
qstr: constify instances in lustre
qstr: constify instances in f2fs
qstr: constify instances in ext2
qstr: constify instances in vfat
qstr: constify instances in procfs
qstr: constify instances in fuse
qstr constify instances in fs/dcache.c
qstr: constify instances in nfs
qstr: constify instances in ocfs2
qstr: constify instances in autofs4
qstr: constify instances in hfs
qstr: constify instances in hfsplus
qstr: constify instances in logfs
qstr: constify dentry_init_security
21 files changed:
Simple merge
diff --cc fs/adfs/dir.c
Simple merge
diff --cc fs/autofs4/waitq.c
Simple merge
diff --cc fs/dcache.c
Simple merge
diff --cc fs/ext2/ext2.h
Simple merge
diff --cc fs/f2fs/dir.c
index a485f68a76b1144d91c4895e89d8483eb701472e,3b095a35aa471c1cb22cacf90c948a0dd2073787..9054aeac80152ba952eb2f362d3bb106280b115e
--- 1/fs/f2fs/dir.c
--- 2/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
struct f2fs_dir_entry *f2fs_parent_dir(struct inode *dir, struct page **p)
{
- struct page *page;
- struct f2fs_dir_entry *de;
- struct f2fs_dentry_block *dentry_blk;
-
- if (f2fs_has_inline_dentry(dir))
- return f2fs_parent_inline_dir(dir, p);
-
- page = get_lock_data_page(dir, 0, false);
- if (IS_ERR(page))
- return NULL;
+ struct qstr dotdot = QSTR_INIT("..", 2);
- dentry_blk = kmap(page);
- de = &dentry_blk->dentry[1];
- *p = page;
- unlock_page(page);
- return de;
+ return f2fs_find_entry(dir, &dotdot, p);
}
- ino_t f2fs_inode_by_name(struct inode *dir, struct qstr *qstr,
-ino_t f2fs_inode_by_name(struct inode *dir, const struct qstr *qstr)
++ino_t f2fs_inode_by_name(struct inode *dir, const struct qstr *qstr,
+ struct page **page)
{
ino_t res = 0;
struct f2fs_dir_entry *de;
diff --cc fs/f2fs/f2fs.h
index 7890e9071499cbf6e3337daa875e721b147fefe9,fd0a156d75614586d268d57a5a4838dc05f207d6..675fa79d86f6500d779917b7ca7da3e62f14fda7
--- 1/fs/f2fs/f2fs.h
--- 2/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
const struct qstr *, struct page *);
void update_parent_metadata(struct inode *, struct inode *, unsigned int);
int room_for_filename(const void *, int, int);
-void f2fs_drop_nlink(struct inode *, struct inode *, struct page *);
+void f2fs_drop_nlink(struct inode *, struct inode *);
- struct f2fs_dir_entry *f2fs_find_entry(struct inode *, struct qstr *,
+ struct f2fs_dir_entry *f2fs_find_entry(struct inode *, const struct qstr *,
struct page **);
struct f2fs_dir_entry *f2fs_parent_dir(struct inode *, struct page **);
- ino_t f2fs_inode_by_name(struct inode *, struct qstr *, struct page **);
-ino_t f2fs_inode_by_name(struct inode *, const struct qstr *);
++ino_t f2fs_inode_by_name(struct inode *, const struct qstr *, struct page **);
void f2fs_set_link(struct inode *, struct f2fs_dir_entry *,
struct page *, struct inode *);
int update_dent_inode(struct inode *, struct inode *, const struct qstr *);
diff --cc fs/fat/namei_vfat.c
Simple merge
diff --cc fs/fuse/dir.c
Simple merge
diff --cc fs/fuse/fuse_i.h
Simple merge
diff --cc fs/fuse/inode.c
Simple merge
diff --cc fs/hfs/inode.c
Simple merge
diff --cc fs/hfsplus/hfsplus_fs.h
Simple merge
diff --cc fs/logfs/dir.c
index bcd754d216bd1be454ceddd61fc1cdb08b2c9734,438b7c516fd6ab45abdd26571ff6596cd74b5385..9568064ecadf263a59428d607d8e69e118be881e
--- 1/fs/logfs/dir.c
--- 2/fs/logfs/dir.c
+++ b/fs/logfs/dir.c
static struct page *logfs_get_dd_page(struct inode *dir, struct dentry *dentry)
{
- struct qstr *name = &dentry->d_name;
+ const struct qstr *name = &dentry->d_name;
struct page *page;
struct logfs_disk_dentry *dd;
- u32 hash = hash_32(name->name, name->len, 0);
+ u32 hash = logfs_hash_32(name->name, name->len, 0);
pgoff_t index;
int round;
diff --cc fs/nfs/nfs4_fs.h
Simple merge
diff --cc fs/nfs/nfs4proc.c
Simple merge
diff --cc fs/proc/proc_sysctl.c
Simple merge
diff --cc include/linux/dcache.h
Simple merge
diff --cc include/linux/nfs_xdr.h
Simple merge
diff --cc security/security.c
Simple merge
diff --cc security/selinux/hooks.c
Simple merge