From: Deepa Dinamani <deepa.kernel@gmail.com>
To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: arnd@arndb.de, tglx@linutronix.de, torvalds@linux-foundation.org,
gregkh@linuxfoundation.org, akpm@linux-foundation.org,
tytso@mit.edu, viro@zeniv.linux.org.uk, y2038@lists.linaro.org
Subject: [PATCH v5 2/5] fs: proc: Delete inode time initializations in proc_alloc_inode()
Date: Wed, 14 Sep 2016 07:48:03 -0700 [thread overview]
Message-ID: <1473864486-30862-3-git-send-email-deepa.kernel@gmail.com> (raw)
In-Reply-To: <1473864486-30862-1-git-send-email-deepa.kernel@gmail.com>
proc uses new_inode_pseudo() to allocate a new inode.
This in turn calls the proc_inode_alloc() callback.
But, at this point, inode is still not initialized
with the super_block pointer which only happens just
before alloc_inode() returns after the call to
inode_init_always().
Also, the inode times are initialized again after the
call to new_inode_pseudo() in proc_inode_alloc().
The assignemet in proc_alloc_inode() is redundant and
also doesn't work after the current_time() api is
changed to take struct inode* instead of
struct *super_block.
This bug was reported after current_time() was used to
assign times in proc_alloc_inode().
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com> [0-day test robot]
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
---
fs/proc/inode.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index c1b7238..ce1f1a9 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -68,7 +68,6 @@ static struct inode *proc_alloc_inode(struct super_block *sb)
ei->sysctl_entry = NULL;
ei->ns_ops = NULL;
inode = &ei->vfs_inode;
- inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
return inode;
}
--
2.7.4
next prev parent reply other threads:[~2016-09-14 14:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-14 14:48 [PATCH v5 0/5] Introduce current_time() api Deepa Dinamani
2016-09-14 14:48 ` [PATCH v5 1/5] vfs: Add " Deepa Dinamani
2016-09-14 18:52 ` Thomas Gleixner
2016-09-14 20:29 ` Deepa Dinamani
2016-09-14 20:33 ` Thomas Gleixner
2016-09-14 14:48 ` Deepa Dinamani [this message]
2016-09-14 14:48 ` [PATCH v5 3/5] fs: Replace CURRENT_TIME with current_time() for inode timestamps Deepa Dinamani
2016-09-14 14:48 ` [PATCH v5 4/5] fs: Replace CURRENT_TIME_SEC " Deepa Dinamani
2016-09-14 14:48 ` [PATCH v5 5/5] fs: Replace current_fs_time() with current_time() Deepa Dinamani
2016-09-14 16:45 ` [PATCH v5 0/5] Introduce current_time() api Linus Torvalds
2016-09-27 22:46 ` Al Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1473864486-30862-3-git-send-email-deepa.kernel@gmail.com \
--to=deepa.kernel@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
--cc=y2038@lists.linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.