Re: [PATCH] fs: don't remove inotify watchers from alive inode-s

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue 09-09-14 02:27:12, Al Viro wrote:
http://lkml.org/lkml/2014/9/8/762
> I agree that it changes user-visible ABI and I agree the behavior
> isn't really specified in the manpage.

Shouldn't we start with putting the expected behavior into the manpage before patching the code? I am missing a patch for man7/inotify.7.

On Mon, Sep 08, 2014 at 04:01:56PM +0400, Andrey Vagin wrote:
http://lkml.org/lkml/2014/9/8/219
>
> 	fd = inotify_init1(IN_NONBLOCK);
> 	deleted = open(path, O_CREAT | O_TRUNC | O_WRONLY, 0666);
> 	link(path, path_link);
>
> 	wd_deleted = inotify_add_watch(fd, path_link, IN_ALL_EVENTS);
>
> 	unlink(path);
> 	unlink(path_link);
>
> 	printf(" --- unlink\n");
> 	read_evetns(fd);
>
> 	close(deleted);
> 	printf(" --- close\n");
> 	read_evetns(fd);
>
> Without this patch:
>   --- unlink
> 4	(IN_ATTRIB)
> 400	(IN_DELETE_SELF)
> 8000	(IN_IGNORED)
>   --- close
> FAIL
>
> With this patch:
>   --- unlink
> 4	(IN_ATTRIB)
> 400	(IN_DELETE_SELF)
>   --- close
> 8	(IN_CLOSE_WRITE)
> 400	(IN_DELETE_SELF)
> 8000	(IN_IGNORED)
> PASS

Shouldn't the second IN_DELETE_SELF occur before
--- close ?
Why is IN_CLOSE_WRITE created?

Best regards

Heinrich Schuchardt

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux