From: "Andrey Jr. Melnikov" <temnota.am@gmail.com>
To: Miklos Szeredi <miklos@szeredi.hu>, linux-unionfs@vger.kernel.org
Cc: John McCutchan <john@johnmccutchan.com>,
Robert Love <rlove@rlove.org>, Eric Paris <eparis@parisplace.org>
Subject: [PATCH] Fix overlayfs inotify interaction
Date: Thu, 30 Jun 2016 14:04:20 +0300 [thread overview]
Message-ID: <20160630105956.GA9949@ppc.Dlink> (raw)
Fix overlayfs inotify interaction - use d_real_inode() helper
to resolve real (underlying) inode. Without this inotify is not functional on
overlayfs.
Signed-off-by: Andrey Jr. Melnikov <temnota.am@gmail.com>
---
Runtime tested with inotifywait in monitor mode to confirm event generation.
cd /tmp/ && mkdir dest upper lower work
mount -t overlay none dest -o upperdir=upper/,lowerdir=lower/,workdir=work/
while /bin/true; do echo test >>/tmp/dest/lower-data; sleep 5; done &
inotifywait -m /tmp/dest/lower-data
fs/notify/inotify/inotify_user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index b8d08d0..592ce16 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -742,7 +742,7 @@ SYSCALL_DEFINE3(inotify_add_watch, int, fd, const char __user *, pathname,
goto fput_and_out;
/* inode held in place by reference to path; group by fget on fd */
- inode = path.dentry->d_inode;
+ inode = d_real_inode(path.dentry);
group = f.file->private_data;
/* create/update an inode mark */
--
2.8.1
next reply other threads:[~2016-06-30 11:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-30 11:04 Andrey Jr. Melnikov [this message]
2016-07-12 21:01 ` [PATCH] Fix overlayfs inotify interaction Andrey Melnikov
2016-07-14 9:23 ` Miklos Szeredi
2016-07-14 9:42 ` Andrey Melnikov
2016-07-14 9:53 ` Miklos Szeredi
2016-07-14 10:08 ` Andrey Melnikov
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=20160630105956.GA9949@ppc.Dlink \
--to=temnota.am@gmail.com \
--cc=eparis@parisplace.org \
--cc=john@johnmccutchan.com \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=rlove@rlove.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.