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 <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/