summaryrefslogtreecommitdiff
path: root/fs/nfsd/nfs2acl.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2008-02-06 01:37:13 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-06 10:41:05 -0800
commitece95912db94d98e202cbedb8f35206deb29d83d (patch)
tree7900aa32e8f8ee26f708471664a5b4024997be40 /fs/nfsd/nfs2acl.c
parent6d9851618104a21dbf5ee8260b5f2d4b5229c77e (diff)
inotify: send IN_ATTRIB events when link count changes
Currently, no notification event has been sent when inode's link count changed. This is inconvenient for the application in some cases: Suppose you have the following directory structure foo/test bar/ and you watch test. If someone does "mv foo/test bar/", you get event IN_MOVE_SELF and you know something has happened with the file "test". However if someone does "ln foo/test bar/test" and "rm foo/test" you get no inotify event for the file "test" (only directories "foo" and "bar" receive events). Furthermore it could be argued that link count belongs to file's metadata and thus IN_ATTRIB should be sent when it changes. The following patch implements sending of IN_ATTRIB inotify events when link count of the inode changes, i.e., when a hardlink to the inode is created or when it is removed. This event is sent in addition to all the events sent so far. In particular, when a last link to a file is removed, IN_ATTRIB event is sent in addition to IN_DELETE_SELF event. Signed-off-by: Jan Kara <jack@suse.cz> Acked-by: Morten Welinder <mwelinder@gmail.com> Cc: Robert Love <rlove@google.com> Cc: John McCutchan <ttb@tentacle.dhs.org> Cc: Steven French <sfrench@us.ibm.com> Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nfsd/nfs2acl.c')
0 files changed, 0 insertions, 0 deletions