Skip to contentSkip to conversation

proc: use pid_has_task() in proc_inode_is_dead()

PATCH Applied Oleg Nesterov 2 participants 2 messages Oct 17 – Oct 21 Proc filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 proc: use pid_has_task() in proc_inode_is_dead()

to make it more readable and consistent.

---
 fs/proc/base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/proc/base.c +1 -1
index 6a39de424f62..a545796177e8 100644
@@ -2064,7 +2064,7 @@ static int pid_revalidate(struct inode *dir, const struct qstr *name,
 
 static inline bool proc_inode_is_dead(struct inode *inode)
 {
-	return !proc_pid(inode)->tasks[PIDTYPE_PID].first;
+	return !pid_has_task(proc_pid(inode), PIDTYPE_PID);
 }
 
 int pid_delete_dentry(const struct dentry *dentry)
Signature · 1 line
2.55.0
#1 lore raw
Quoted 1 line · Oleg Nesterov

to make it more readable and consistent.

Applied to the master branch of the vfs/vfs.git tree. Patches in the master branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: master

[1/1] proc: use pid_has_task() in proc_inode_is_dead()

      https://git.kernel.org/vfs/vfs/c/af74053005a2