Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'nfs-for-5.0-4' of git://git.linux-nfs.org/projects/anna/linux-nfs

Pull more NFS client fixes from Anna Schumaker:
"Three fixes this time.

Nicolas's is for xprtrdma completion vector allocation on single-core
systems. Greg's adds an error check when allocating a debugfs dentry.
And Ben's is an additional fix for nfs_page_async_flush() to prevent
pages from accidentally getting truncated.

Summary:

- Make sure Send CQ is allocated on an existing compvec

- Properly check debugfs dentry before using it

- Don't use page_file_mapping() after removing a page"

* tag 'nfs-for-5.0-4' of git://git.linux-nfs.org/projects/anna/linux-nfs:
NFS: Don't use page_file_mapping after removing the page
rpc: properly check debugfs dentry before using it
xprtrdma: Make sure Send CQ is allocated on an existing compvec

+9 -7
+6 -5
fs/nfs/write.c
··· 238 238 } 239 239 240 240 /* A writeback failed: mark the page as bad, and invalidate the page cache */ 241 - static void nfs_set_pageerror(struct page *page) 241 + static void nfs_set_pageerror(struct address_space *mapping) 242 242 { 243 - nfs_zap_mapping(page_file_mapping(page)->host, page_file_mapping(page)); 243 + nfs_zap_mapping(mapping->host, mapping); 244 244 } 245 245 246 246 /* ··· 994 994 nfs_list_remove_request(req); 995 995 if (test_bit(NFS_IOHDR_ERROR, &hdr->flags) && 996 996 (hdr->good_bytes < bytes)) { 997 - nfs_set_pageerror(req->wb_page); 997 + nfs_set_pageerror(page_file_mapping(req->wb_page)); 998 998 nfs_context_set_write_error(req->wb_context, hdr->error); 999 999 goto remove_req; 1000 1000 } ··· 1348 1348 unsigned int offset, unsigned int count) 1349 1349 { 1350 1350 struct nfs_open_context *ctx = nfs_file_open_context(file); 1351 - struct inode *inode = page_file_mapping(page)->host; 1351 + struct address_space *mapping = page_file_mapping(page); 1352 + struct inode *inode = mapping->host; 1352 1353 int status = 0; 1353 1354 1354 1355 nfs_inc_stats(inode, NFSIOS_VFSUPDATEPAGE); ··· 1367 1366 1368 1367 status = nfs_writepage_setup(ctx, page, offset, count); 1369 1368 if (status < 0) 1370 - nfs_set_pageerror(page); 1369 + nfs_set_pageerror(mapping); 1371 1370 else 1372 1371 __set_page_dirty_nobuffers(page); 1373 1372 out:
+1 -1
net/sunrpc/debugfs.c
··· 146 146 rcu_read_lock(); 147 147 xprt = rcu_dereference(clnt->cl_xprt); 148 148 /* no "debugfs" dentry? Don't bother with the symlink. */ 149 - if (!xprt->debugfs) { 149 + if (IS_ERR_OR_NULL(xprt->debugfs)) { 150 150 rcu_read_unlock(); 151 151 return; 152 152 }
+2 -1
net/sunrpc/xprtrdma/verbs.c
··· 527 527 528 528 sendcq = ib_alloc_cq(ia->ri_device, NULL, 529 529 ep->rep_attr.cap.max_send_wr + 1, 530 - 1, IB_POLL_WORKQUEUE); 530 + ia->ri_device->num_comp_vectors > 1 ? 1 : 0, 531 + IB_POLL_WORKQUEUE); 531 532 if (IS_ERR(sendcq)) { 532 533 rc = PTR_ERR(sendcq); 533 534 goto out1;