1
0
Fork 0
alistair23-linux/include
Jan Kara ece95912db 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>
2008-02-06 10:41:05 -08:00
..
acpi include/acpi/: Spelling fixes 2008-02-03 17:07:16 +02:00
asm-alpha alpha: fix warning by fixing flush_tlb_kernel_range() 2008-02-05 09:44:22 -08:00
asm-arm add mm argument to pte/pmd/pud/pgd_free 2008-02-05 09:44:18 -08:00
asm-avr32 read_current_timer() cleanups 2008-02-06 10:41:02 -08:00
asm-blackfin remove mm_{ptov,vtop}() 2008-02-06 10:41:01 -08:00
asm-cris cris: remove unused __dummy, CONST_ADDR and ADDR from bitops.h 2008-02-05 09:44:24 -08:00
asm-frv timerfd: fix remaining architectures 2008-02-05 14:37:15 -08:00
asm-generic remove support for un-needed _extratext section 2008-02-06 10:41:01 -08:00
asm-h8300 remove mm_{ptov,vtop}() 2008-02-06 10:41:01 -08:00
asm-ia64 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2008-02-05 10:24:52 -08:00
asm-m32r timerfd: fix remaining architectures 2008-02-05 14:37:15 -08:00
asm-m68k cleanup after APUS removal 2008-02-06 10:41:01 -08:00
asm-m68knommu remove mm_{ptov,vtop}() 2008-02-06 10:41:01 -08:00
asm-mips add mm argument to pte/pmd/pud/pgd_free 2008-02-05 09:44:18 -08:00
asm-parisc add mm argument to pte/pmd/pud/pgd_free 2008-02-05 09:44:18 -08:00
asm-powerpc scheduled OSS driver removal 2008-02-06 10:41:02 -08:00
asm-ppc add mm argument to pte/pmd/pud/pgd_free 2008-02-05 09:44:18 -08:00
asm-s390 taskstats scaled time cleanup 2008-02-06 10:41:00 -08:00
asm-sh timerfd: fix remaining architectures 2008-02-05 14:37:15 -08:00
asm-sparc add mm argument to pte/pmd/pud/pgd_free 2008-02-05 09:44:18 -08:00
asm-sparc64 read_current_timer() cleanups 2008-02-06 10:41:02 -08:00
asm-um uml: LDT mutex conversion 2008-02-05 09:44:31 -08:00
asm-v850 remove mm_{ptov,vtop}() 2008-02-06 10:41:01 -08:00
asm-x86 read_current_timer() cleanups 2008-02-06 10:41:02 -08:00
asm-xtensa add mm argument to pte/pmd/pud/pgd_free 2008-02-05 09:44:18 -08:00
crypto [CRYPTO] api: Include sched.h for cond_resched in scatterwalk.h 2008-01-11 08:16:59 +11:00
keys KEYS: Make request_key() and co fundamentally asynchronous 2007-10-17 08:42:57 -07:00
linux inotify: send IN_ATTRIB events when link count changes 2008-02-06 10:41:05 -08:00
math-emu
media include/media/: Spelling fixes 2008-02-03 17:19:47 +02:00
mtd
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2008-02-05 10:09:07 -08:00
pcmcia pcmcia: replace kio_addr_t with unsigned int everywhere 2008-02-05 09:44:08 -08:00
rdma RDMA/cma: add support for rdma_migrate_id() 2008-01-25 14:15:32 -08:00
rxrpc
scsi include/scsi/: Spelling fixes 2008-02-03 17:47:00 +02:00
sound [ALSA] version 1.0.16rc2 2008-01-31 17:40:18 +01:00
video Make asm-x86/bootparam.h includable from userspace. 2007-10-23 15:49:47 +10:00
xen x86: page.h: make pte_t a union to always include 2008-01-30 13:32:57 +01:00
Kbuild do not export /usr/include/scsi in make headers_install 2007-10-17 08:42:52 -07:00