]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
nfs: fix comment and add warn_on for PG_INODE_REF
authorWeston Andros Adamson <dros@primarydata.com>
Fri, 18 Jul 2014 00:42:16 +0000 (20:42 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Sun, 3 Aug 2014 21:05:25 +0000 (17:05 -0400)
Fix the comment in nfs_page.h for PG_INODE_REF to reflect that it's no longer
set only on head requests. Also add a WARN_ON_ONCE in nfs_inode_remove_request
as PG_INODE_REF should always be set.

Suggested-by: Peng Tao <tao.peng@primarydata.com>
Signed-off-by: Weston Andros Adamson <dros@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/write.c
include/linux/nfs_page.h

index 8d1ed2b9c16cc6e392e36dae9a3c9b43cf92a019..e6bc5b51f3254df9284ceba1906d3bae61b7eb7e 100644 (file)
@@ -707,6 +707,8 @@ static void nfs_inode_remove_request(struct nfs_page *req)
 
        if (test_and_clear_bit(PG_INODE_REF, &req->wb_flags))
                nfs_release_request(req);
+       else
+               WARN_ON_ONCE(1);
 }
 
 static void
index 291924ca95173cedc9c83a198dab7d4db29aa301..6ad2bbcad4050c12105778c3011b5196fcbf4b9e 100644 (file)
@@ -26,7 +26,7 @@ enum {
        PG_MAPPED,              /* page private set for buffered io */
        PG_CLEAN,               /* write succeeded */
        PG_COMMIT_TO_DS,        /* used by pnfs layouts */
-       PG_INODE_REF,           /* extra ref held by inode (head req only) */
+       PG_INODE_REF,           /* extra ref held by inode when in writeback */
        PG_HEADLOCK,            /* page group lock of wb_head */
        PG_TEARDOWN,            /* page group sync for destroy */
        PG_UNLOCKPAGE,          /* page group sync bit in read path */