lkml.org 
[lkml]   [2010]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[37/93] NFS: Fix a bug in nfs_fscache_release_page()
    2.6.32-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Trond Myklebust <Trond.Myklebust@netapp.com>

    commit 2c1740098c708b465e87637b237feb2fd98f129a upstream.

    Not having an fscache cookie is perfectly valid if the user didn't mount
    with the fscache option.

    This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=15234

    Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
    Acked-by: David Howells <dhowells@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    fs/nfs/fscache.c | 9 ++++-----
    1 file changed, 4 insertions(+), 5 deletions(-)

    --- a/fs/nfs/fscache.c
    +++ b/fs/nfs/fscache.c
    @@ -354,12 +354,11 @@ void nfs_fscache_reset_inode_cookie(stru
    */
    int nfs_fscache_release_page(struct page *page, gfp_t gfp)
    {
    - struct nfs_inode *nfsi = NFS_I(page->mapping->host);
    - struct fscache_cookie *cookie = nfsi->fscache;
    -
    - BUG_ON(!cookie);
    -
    if (PageFsCache(page)) {
    + struct nfs_inode *nfsi = NFS_I(page->mapping->host);
    + struct fscache_cookie *cookie = nfsi->fscache;
    +
    + BUG_ON(!cookie);
    dfprintk(FSCACHE, "NFS: fscache releasepage (0x%p/0x%p/0x%p)\n",
    cookie, page, nfsi);




    \
     
     \ /
      Last update: 2010-02-19 18:15    [W:0.036 / U:30.756 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site