]> git.baikalelectronics.ru Git - kernel.git/commitdiff
NFS: remove set but not used variable 'mapping'
authorYueHaibing <yuehaibing@huawei.com>
Tue, 27 Aug 2019 07:16:36 +0000 (15:16 +0800)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 27 Aug 2019 14:24:56 +0000 (10:24 -0400)
Fixes gcc '-Wunused-but-set-variable' warning:

fs/nfs/write.c: In function nfs_page_async_flush:
fs/nfs/write.c:609:24: warning: variable mapping set but not used [-Wunused-but-set-variable]

It is not use since commit aefb623c422e ("NFS: Fix
writepage(s) error handling to not report errors twice")

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/write.c

index d193042fa22857612149092f7c8357a6157b5b01..85ca49549b39bdf5b9bea4e65dbb52d15945231b 100644 (file)
@@ -606,7 +606,6 @@ static void nfs_write_error(struct nfs_page *req, int error)
 static int nfs_page_async_flush(struct nfs_pageio_descriptor *pgio,
                                struct page *page)
 {
-       struct address_space *mapping;
        struct nfs_page *req;
        int ret = 0;
 
@@ -621,7 +620,6 @@ static int nfs_page_async_flush(struct nfs_pageio_descriptor *pgio,
        WARN_ON_ONCE(test_bit(PG_CLEAN, &req->wb_flags));
 
        /* If there is a fatal error that covers this write, just exit */
-       mapping = page_file_mapping(page);
        ret = pgio->pg_error;
        if (nfs_error_is_fatal_on_server(ret))
                goto out_launder;