]> git.hungrycats.org Git - linux/commitdiff
[XFS] Add back a missing pflags check in releasepage.
authorNathan Scott <nathans@sgi.com>
Tue, 10 Feb 2004 02:31:45 +0000 (13:31 +1100)
committerNathan Scott <nathans@sgi.com>
Tue, 10 Feb 2004 02:31:45 +0000 (13:31 +1100)
SGI Modid: xfs-linux:xfs-kern:166323a

fs/xfs/linux/xfs_aops.c

index 112e297e4b678a197ddad23e41e34f47bc9306de..5e2c9a3d88095c9d5cc8320c103fd8eee230d0e7 100644 (file)
@@ -410,7 +410,6 @@ map_unwritten(
        /* get an "empty" pagebuf to manage IO completion
         * Proper values will be set before returning */
        pb = pagebuf_lookup(iomapp->iomap_target, 0, 0, 0);
-
        if (!pb)
                return -EAGAIN;
 
@@ -473,7 +472,7 @@ map_unwritten(
                        nblocks += bs;
                        atomic_add(bs, &pb->pb_io_remaining);
                        convert_page(inode, page, iomapp, pb, startio, all_bh);
-                        /* stop if converting the next page might add
+                       /* stop if converting the next page might add
                         * enough blocks that the corresponding byte
                         * count won't fit in our ulong page buf length */
                        if (nblocks >= ((ULONG_MAX - PAGE_SIZE) >> block_bits))
@@ -1183,6 +1182,12 @@ linvfs_release_page(
        if (!(gfp_mask & __GFP_FS))
                return 0;
 
+       /* If we are already inside a transaction or the thread cannot
+        * do I/O, we cannot release this page.
+        */
+       if (PFLAGS_TEST_FSTRANS())
+               return 0;
+
        /*
         * Convert delalloc space to real space, do not flush the
         * data out to disk, that will be done by the caller.