]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfs/dir.c
[PATCH] r/o bind mounts: check mnt instead of superblock directly
[linux-2.6-omap-h63xx.git] / fs / nfs / dir.c
index 6cea7479c5b4d13136fb753eecc453f19dc43229..d9e30ac2798dc1d79ac46ad1a9b6b385252d4ab3 100644 (file)
@@ -967,7 +967,8 @@ static int is_atomic_open(struct inode *dir, struct nameidata *nd)
        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 (__mnt_is_readonly(nd->path.mnt) &&
+           (nd->intent.open.flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
                return 0;
        return 1;
 }