NFSv4.1: Convert pNFS deviceid to use kfree_rcu()
authorTrond Myklebust <trond.myklebust@primarydata.com>
Mon, 9 Mar 2015 19:23:35 +0000 (15:23 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 27 Mar 2015 16:32:24 +0000 (12:32 -0400)
Use of synchronize_rcu() when unmounting and potentially freeing a lot
of deviceids is problematic. There really is no reason why we can't just
use kfree_rcu() here.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/blocklayout/dev.c
fs/nfs/filelayout/filelayoutdev.c
fs/nfs/flexfilelayout/flexfilelayoutdev.c
fs/nfs/objlayout/objio_osd.c
fs/nfs/pnfs.h
fs/nfs/pnfs_dev.c

index 5aed4f9..e535599 100644 (file)
@@ -33,7 +33,7 @@ bl_free_deviceid_node(struct nfs4_deviceid_node *d)
                container_of(d, struct pnfs_block_dev, node);
 
        bl_free_device(dev);
-       kfree(dev);
+       kfree_rcu(dev, node.rcu);
 }
 
 static int
Simple merge
Simple merge
diff --cc fs/nfs/pnfs.h
Simple merge
Simple merge