Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 835c92d4 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'work.const-qstr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

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
parents ce804bf5 19a6d89d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -781,7 +781,7 @@ static int sa_args_init(struct inode *dir, struct inode *child,
			struct ll_sa_entry *entry, struct md_enqueue_info **pmi,
			struct ldlm_enqueue_info **pei)
{
	struct qstr	      *qstr = &entry->se_qstr;
	const struct qstr      *qstr = &entry->se_qstr;
	struct ll_inode_info     *lli  = ll_i2info(dir);
	struct md_enqueue_info   *minfo;
	struct ldlm_enqueue_info *einfo;
@@ -1340,7 +1340,7 @@ enum {
static int is_first_dirent(struct inode *dir, struct dentry *dentry)
{
	struct ll_dir_chain   chain;
	struct qstr	  *target = &dentry->d_name;
	const struct qstr  *target = &dentry->d_name;
	struct page	  *page;
	__u64		 pos    = 0;
	int		   dot_de;
+2 −2
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ adfs_dir_update(struct super_block *sb, struct object_info *obj, int wait)
}

static int
adfs_match(struct qstr *name, struct object_info *obj)
adfs_match(const struct qstr *name, struct object_info *obj)
{
	int i;

@@ -126,7 +126,7 @@ adfs_match(struct qstr *name, struct object_info *obj)
}

static int
adfs_dir_lookup_byname(struct inode *inode, struct qstr *name, struct object_info *obj)
adfs_dir_lookup_byname(struct inode *inode, const struct qstr *name, struct object_info *obj)
{
	struct super_block *sb = inode->i_sb;
	const struct adfs_dir_ops *ops = ADFS_SB(sb)->s_dir;
+4 −4
Original line number Diff line number Diff line
@@ -159,7 +159,7 @@ static struct dentry *autofs4_lookup_active(struct dentry *dentry)
{
	struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb);
	struct dentry *parent = dentry->d_parent;
	struct qstr *name = &dentry->d_name;
	const struct qstr *name = &dentry->d_name;
	unsigned int len = name->len;
	unsigned int hash = name->hash;
	const unsigned char *str = name->name;
@@ -172,7 +172,7 @@ static struct dentry *autofs4_lookup_active(struct dentry *dentry)
	list_for_each(p, head) {
		struct autofs_info *ino;
		struct dentry *active;
		struct qstr *qstr;
		const struct qstr *qstr;

		ino = list_entry(p, struct autofs_info, active);
		active = ino->dentry;
@@ -214,7 +214,7 @@ static struct dentry *autofs4_lookup_expiring(struct dentry *dentry,
{
	struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb);
	struct dentry *parent = dentry->d_parent;
	struct qstr *name = &dentry->d_name;
	const struct qstr *name = &dentry->d_name;
	unsigned int len = name->len;
	unsigned int hash = name->hash;
	const unsigned char *str = name->name;
@@ -227,7 +227,7 @@ static struct dentry *autofs4_lookup_expiring(struct dentry *dentry,
	list_for_each(p, head) {
		struct autofs_info *ino;
		struct dentry *expiring;
		struct qstr *qstr;
		const struct qstr *qstr;

		if (rcu_walk) {
			spin_unlock(&sbi->lookup_lock);
+2 −2
Original line number Diff line number Diff line
@@ -225,7 +225,7 @@ static int autofs4_getpath(struct autofs_sb_info *sbi,
}

static struct autofs_wait_queue *
autofs4_find_wait(struct autofs_sb_info *sbi, struct qstr *qstr)
autofs4_find_wait(struct autofs_sb_info *sbi, const struct qstr *qstr)
{
	struct autofs_wait_queue *wq;

@@ -249,7 +249,7 @@ autofs4_find_wait(struct autofs_sb_info *sbi, struct qstr *qstr)
 */
static int validate_request(struct autofs_wait_queue **wait,
			    struct autofs_sb_info *sbi,
			    struct qstr *qstr,
			    const struct qstr *qstr,
			    struct dentry *dentry, enum autofs_notify notify)
{
	struct autofs_wait_queue *wq;
+2 −2
Original line number Diff line number Diff line
@@ -2636,7 +2636,7 @@ EXPORT_SYMBOL(d_exact_alias);
 * Parent inode i_mutex must be held over d_lookup and into this call (to
 * keep renames and concurrent inserts, and readdir(2) away).
 */
void dentry_update_name_case(struct dentry *dentry, struct qstr *name)
void dentry_update_name_case(struct dentry *dentry, const struct qstr *name)
{
	BUG_ON(!inode_is_locked(dentry->d_parent->d_inode));
	BUG_ON(dentry->d_name.len != name->len); /* d_lookup gives this */
@@ -3038,7 +3038,7 @@ static int prepend(char **buffer, int *buflen, const char *str, int namelen)
 * Data dependency barrier is needed to make sure that we see that terminating
 * NUL.  Alpha strikes again, film at 11...
 */
static int prepend_name(char **buffer, int *buflen, struct qstr *name)
static int prepend_name(char **buffer, int *buflen, const struct qstr *name)
{
	const char *dname = ACCESS_ONCE(name->name);
	u32 dlen = ACCESS_ONCE(name->len);
Loading