lkml.org 
[lkml]   [2005]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch 6/6] Bind Mount Extensions 0.06
On Tue, Feb 22, 2005 at 09:34:31AM -0500, Trond Myklebust wrote:
> ty den 22.02.2005 Klokka 13:13 (+0100) skreiv Herbert Poetzl:
> >
> > diff -NurpP --minimal linux-2.6.11-rc4-bme0.06-bm0.01-at0.01-cc0.01-co0.01-xa0.01/fs/nfs/dir.c linux-2.6.11-rc4-bme0.06-bm0.01-at0.01-cc0.01-co0.01-xa0.01-ro0.01/fs/nfs/dir.c
> > --- linux-2.6.11-rc4-bme0.06-bm0.01-at0.01-cc0.01-co0.01-xa0.01/fs/nfs/dir.c 2005-02-13 17:16:55 +0100
> > +++ linux-2.6.11-rc4-bme0.06-bm0.01-at0.01-cc0.01-co0.01-xa0.01-ro0.01/fs/nfs/dir.c 2005-02-19 06:32:05 +0100
> > @@ -771,7 +771,8 @@ static int is_atomic_open(struct inode *
> > if (nd->flags & LOOKUP_DIRECTORY)
> > return 0;
> > /* Are we trying to write to a read only partition? */
> > - if (IS_RDONLY(dir) && (nd->intent.open.flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
> > + if ((IS_RDONLY(dir) || (nd && MNT_IS_RDONLY(nd->mnt))) &&
> > + (nd->intent.open.flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
> > return 0;
> > return 1;
> > }
>
> The check for nd != NULL is redundant. See 5 lines further up...

indeed, thanks!

> Cheers,
> Trond
>
> --
> Trond Myklebust <trond.myklebust@fys.uio.no>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.048 / U:0.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site