Skip to contentSkip to conversation

+ proc-set-attributes-of-pde-using-accessor-functions.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Dec 10, 2013 Proc filesystem

lore
Share & tools
lore
#0 lore raw

Subject: + proc-set-attributes-of-pde-using-accessor-functions.patch added to -mm tree
To: [email protected]
From: [email protected]
Date: Tue, 10 Dec 2013 15:03:45 -0800

The patch titled
Subject: proc: set attributes of pde using accessor functions
has been added to the -mm tree. Its filename is
proc-set-attributes-of-pde-using-accessor-functions.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/proc-set-attributes-of-pde-using-accessor-functions.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/proc-set-attributes-of-pde-using-accessor-functions.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Rui Xiang <[email protected]>
Subject: proc: set attributes of pde using accessor functions

Use existing accessors proc_set_user() and proc_set_size() to set attributes. Just a cleanup.

---

 fs/proc/generic.c      |    3 +--
 fs/proc/proc_devtree.c |    4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)
fs/proc/generic.c renamed from fs/proc/generic.c~proc-set-attributes-of-pde-using-accessor-functions +1 -2
diff -puN fs/proc/generic.c~proc-set-attributes-of-pde-using-accessor-functions fs/proc/generic.c
@@ -49,8 +49,7 @@ static int proc_notify_change(struct den
 	setattr_copy(inode, iattr);
 	mark_inode_dirty(inode);
 
-	de->uid = inode->i_uid;
-	de->gid = inode->i_gid;
+	proc_set_user(de, inode->i_uid, inode->i_gid);
 	de->mode = inode->i_mode;
 	return 0;
 }
fs/proc/proc_devtree.c renamed from fs/proc/proc_devtree.c~proc-set-attributes-of-pde-using-accessor-functions +2 -2
diff -puN fs/proc/proc_devtree.c~proc-set-attributes-of-pde-using-accessor-functions fs/proc/proc_devtree.c
@@ -74,9 +74,9 @@ __proc_device_tree_add_prop(struct proc_
 		return NULL;
 
 	if (!strncmp(name, "security-", 9))
-		ent->size = 0; /* don't leak number of password chars */
+		proc_set_size(ent, 0); /* don't leak number of password chars */
 	else
-		ent->size = pp->length;
+		proc_set_size(ent, pp->length);
 
 	return ent;
 }

_

Patches currently in -mm which might be from [email protected] are

autofs-fix-the-return-value-of-autofs4_fill_super.patch autofs-use-is_root-to-replace-root-dentry-checks.patch proc-set-attributes-of-pde-using-accessor-functions.patch