LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] kernfs: remove outdated and confusing comment
@ 2015-03-11 10:26 Wolfram Sang
  2015-03-11 11:45 ` Tejun Heo
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2015-03-11 10:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Wolfram Sang, linux-sh, Tejun Heo

From: Wolfram Sang <wsa+renesas@sang-engineering.com>

Grabbing the parent is not happening anymore since 2010 (e72ceb8ccac5f7
"sysfs: Remove sysfs_get/put_active_two"). Remove this confusing
comment.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

Found while trying to find out why my sysfs-bin file always returns POLLPRI
after opening, reading, polling. Any pointers while I am here? :)

 fs/kernfs/file.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c
index b684e8a132e625..a893c634cd9c0b 100644
--- a/fs/kernfs/file.c
+++ b/fs/kernfs/file.c
@@ -784,7 +784,6 @@ static unsigned int kernfs_fop_poll(struct file *filp, poll_table *wait)
 	struct kernfs_node *kn = filp->f_path.dentry->d_fsdata;
 	struct kernfs_open_node *on = kn->attr.open;
 
-	/* need parent for the kobj, grab both */
 	if (!kernfs_get_active(kn))
 		goto trigger;
 
-- 
2.1.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kernfs: remove outdated and confusing comment
  2015-03-11 10:26 [PATCH] kernfs: remove outdated and confusing comment Wolfram Sang
@ 2015-03-11 11:45 ` Tejun Heo
  2015-03-11 13:15   ` Wolfram Sang
  2015-04-23 12:51   ` Wolfram Sang
  0 siblings, 2 replies; 5+ messages in thread
From: Tejun Heo @ 2015-03-11 11:45 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-kernel, linux-sh

On Wed, Mar 11, 2015 at 11:26:02AM +0100, Wolfram Sang wrote:
> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
> 
> Grabbing the parent is not happening anymore since 2010 (e72ceb8ccac5f7
> "sysfs: Remove sysfs_get/put_active_two"). Remove this confusing
> comment.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Acked-by: Tejun Heo <tj@kernel.org>

> Found while trying to find out why my sysfs-bin file always returns POLLPRI
> after opening, reading, polling. Any pointers while I am here? :)

Hmm... poll isn't hooked up for bin files and the behavior isn't well
defined either.  The open file's event counter is never synchronized
to the backing node's.  Before the first kernfs_notify(), it won't
trigger and after always.  We'll prolly need to define that better.
What's the use case that you're interested in?

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kernfs: remove outdated and confusing comment
  2015-03-11 11:45 ` Tejun Heo
@ 2015-03-11 13:15   ` Wolfram Sang
  2015-04-23 12:51   ` Wolfram Sang
  1 sibling, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2015-03-11 13:15 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-kernel, linux-sh

[-- Attachment #1: Type: text/plain, Size: 1120 bytes --]


> Hmm... poll isn't hooked up for bin files and the behavior isn't well

Ah, thanks! I assumed something like that but could not find the
relevant code.

> defined either.  The open file's event counter is never synchronized
> to the backing node's.  Before the first kernfs_notify(), it won't
> trigger and after always.  We'll prolly need to define that better.
> What's the use case that you're interested in?

I wanted to add notification to drivers/i2c/i2c-slave-eeprom.c which is
a software backend when the Linux system is acting as an I2C slave
device.  This is basically a dual mem driver. One side is exposed to the
system as a bin-file in sysfs. The other side is accessible like an
EEPROM for other I2C masters connected to the bus. The notification
should report to userspace when a remote master has written something
to us so the memory contents changed.

I know this is not the best way of notification because we don't know
what changed and would need to compare. However, the whole I2C slave
framework is still very young and I wanted to play with it for the case
where only a few bytes are exposed.


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kernfs: remove outdated and confusing comment
  2015-03-11 11:45 ` Tejun Heo
  2015-03-11 13:15   ` Wolfram Sang
@ 2015-04-23 12:51   ` Wolfram Sang
  2015-04-23 14:56     ` Tejun Heo
  1 sibling, 1 reply; 5+ messages in thread
From: Wolfram Sang @ 2015-04-23 12:51 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-kernel, linux-sh

[-- Attachment #1: Type: text/plain, Size: 532 bytes --]

On Wed, Mar 11, 2015 at 07:45:31AM -0400, Tejun Heo wrote:
> On Wed, Mar 11, 2015 at 11:26:02AM +0100, Wolfram Sang wrote:
> > From: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > 
> > Grabbing the parent is not happening anymore since 2010 (e72ceb8ccac5f7
> > "sysfs: Remove sysfs_get/put_active_two"). Remove this confusing
> > comment.
> > 
> > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> 
> Acked-by: Tejun Heo <tj@kernel.org>

So, how does it go in? gkh? akpm?

Thanks,

   Wolfram


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kernfs: remove outdated and confusing comment
  2015-04-23 12:51   ` Wolfram Sang
@ 2015-04-23 14:56     ` Tejun Heo
  0 siblings, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2015-04-23 14:56 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-kernel, linux-sh

On Thu, Apr 23, 2015 at 02:51:26PM +0200, Wolfram Sang wrote:
> On Wed, Mar 11, 2015 at 07:45:31AM -0400, Tejun Heo wrote:
> > On Wed, Mar 11, 2015 at 11:26:02AM +0100, Wolfram Sang wrote:
> > > From: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > > 
> > > Grabbing the parent is not happening anymore since 2010 (e72ceb8ccac5f7
> > > "sysfs: Remove sysfs_get/put_active_two"). Remove this confusing
> > > comment.
> > > 
> > > Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> > 
> > Acked-by: Tejun Heo <tj@kernel.org>
> 
> So, how does it go in? gkh? akpm?

Usually Greg, ah, who isn't cc'd.  Can you please repost the patch w/
Greg cc'd and my ack added?

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-04-23 14:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-11 10:26 [PATCH] kernfs: remove outdated and confusing comment Wolfram Sang
2015-03-11 11:45 ` Tejun Heo
2015-03-11 13:15   ` Wolfram Sang
2015-04-23 12:51   ` Wolfram Sang
2015-04-23 14:56     ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).