xfs
[Top] [All Lists]

Re: [PATCH 2/8] xfs: Fix open flag handling in open_by_handle code

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 2/8] xfs: Fix open flag handling in open_by_handle code
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 2 Mar 2012 02:47:44 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1330661507-1121-3-git-send-email-david@xxxxxxxxxxxxx>
References: <1330661507-1121-1-git-send-email-david@xxxxxxxxxxxxx> <1330661507-1121-3-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
>       /* Put open permission in namei format. */

this coment is obsolete now.

>       permflag = hreq->oflags;
> -     if ((permflag+1) & O_ACCMODE)
> -             permflag++;
> -     if (permflag & O_TRUNC)
> -             permflag |= 2;
> -
>       if ((!(permflag & O_APPEND) || (permflag & O_TRUNC)) &&
> -         (permflag & FMODE_WRITE) && IS_APPEND(inode)) {
> +         (OPEN_FMODE(permflag) & FMODE_WRITE) && IS_APPEND(inode)) {

It would seem cleaner to still keep a loca fmode_t fmode variable
instead of using OPEN_FMODE multiple times.

<Prev in Thread] Current Thread [Next in Thread>