On Sat, Jun 30, 2007 at 10:27:42AM +0100, Christoph Hellwig wrote:
> On Fri, Jun 29, 2007 at 03:21:29PM -0400, J. Bruce Fields wrote:
> > +static int gfs2_setlease(struct file *file, long arg, struct file_lock 
> > **fl)
> > +{
> > +   struct gfs2_sbd *sdp = GFS2_SB(file->f_mapping->host);
> > +   int ret = -EOPNOTSUPP;
> > +
> > +   if (sdp->sd_args.ar_localflocks) {
> > +           return setlease(file, arg, fl);
> > +   }
> > +
> > +   /* For now fail the delegation request. Cluster file system can not
> > +      allow any node in the cluster to get a local lease until it can
> > +      be managed centrally by the cluster file system.
> > +   */
> > +   return ret;
> > +}
> 
> Very odd way to write this function.  It should look more like:

Agreed; I've reversed the sense of the test, as suggested, and got rid
of the superfluous local "ret".

--b.

> static int gfs2_setlease(struct file *file, long arg, struct file_lock **fl)
> {
>       struct gfs2_sbd *sdp = GFS2_SB(file->f_mapping->host);
>       int ret = -EOPNOTSUPP;
> 
>       /*
>        * For now fail the delegation request. Cluster file system can not
>        * allow any node in the cluster to get a local lease until it can
>        * be managed centrally by the cluster file system.
>        */
>       if (!sdp->sd_args.ar_localflocks)
>               return -EOPNOTSUPP;
> 
>       return setlease(file, arg, fl);
> }
> 
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to