Skip to content

Commit

Permalink
NFS: remove set but not used variable 'mapping'
Browse files Browse the repository at this point in the history
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 aefb623 ("NFS: Fix
writepage(s) error handling to not report errors twice")

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: YueHaibing <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
  • Loading branch information
YueHaibing authored and Trond Myklebust committed Aug 27, 2019
1 parent d33d4be commit 99300a8
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/nfs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down

0 comments on commit 99300a8

Please sign in to comment.