From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Rees Subject: Re: [PATCH RFC] vfs: make fstatat retry on ESTALE errors from getattr call Date: Fri, 13 Apr 2012 08:02:32 -0400 Message-ID: <20120413120232.GA27179@umich.edu> References: <1334316311-22331-1-git-send-email-jlayton@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, pstaubach-83r9SdEf25FBDgjK7y7TUQ@public.gmane.org, miklos-sUDqSbJrdHQHWmgEVkV9KA@public.gmane.org, viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org, hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, michael.brantley-Iq/kdjr4a97QT0dZR+AlfA@public.gmane.org To: Jeff Layton Return-path: Content-Disposition: inline In-Reply-To: <1334316311-22331-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org 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. -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html