[CRIU] [PATCH 6/7] inotify: Use ghost files if the watchee is a deleted file

Cyrill Gorcunov gorcunov at openvz.org
Wed Dec 5 08:02:49 EST 2012


On Wed, Dec 05, 2012 at 04:48:28PM +0400, Pavel Emelyanov wrote:
> > @@ -131,12 +133,16 @@ static int restore_one_inotify(int inotify_fd, InotifyWdEntry *iwe)
> >  
> >  	target = sys_open_by_handle_at(mntfd, (void *)&handle, 0);
> >  	if (target < 0) {
> > -		pr_perror("Can't open file handle for 0x%08x:0x%016lx",
> > -			  iwe->s_dev, iwe->i_ino);
> > -		goto err;
> > -	}
> > +		gf = lookup_ghost_file_st(iwe->s_dev, iwe->i_ino);
> 
> At that point gf may have already being removed. The fact that you bump up
> users _here_ doesn't work. Users should be counted before actual restore starts.

yup :( a race window here. I'll fix it up. Thanks!

	Cyrill


More information about the CRIU mailing list