Re: [PATCH RFC] vfs: make fstatat retry on ESTALE errors from getattr call

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

 



On Fri, 13 Apr 2012 08:02:32 -0400
Jim Rees <rees@xxxxxxxxx> wrote:

> Jeff Layton wrote:
> 
>   +retry:
>    	error = user_path_at(dfd, filename, lookup_flags, &path);
>    	if (error)
>    		goto out;
>    
>    	error = vfs_getattr(path.mnt, path.dentry, stat);
>   +	should_retry = error == -ESTALE ? retry_estale(path.dentry) : false;
>    	path_put(&path);
>   +	if (should_retry) {
>   +		lookup_flags |= LOOKUP_REVAL;
>   +		goto retry;
>   +	}
>    out:
>    	return error;
>    }
> 
> This is starting to look like FORTRAN.  Maybe turn this into a "do while"?
> Then you could make the "goto out" into a break and get rid of them both.

Sure, that's doable. If we want to do a finite number of retries that
may be preferable anyway.

-- 
Jeff Layton <jlayton@xxxxxxxxxx>
--
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