diff options
author | Dave Chinner <dchinner@redhat.com> | 2013-05-20 09:51:12 +1000 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-05-24 16:29:15 -0500 |
commit | b17cb364dbbbf65add79f1610599d01bcb6851f9 (patch) | |
tree | bfc43422ce84648acd7e908080b58e5166928e17 /fs/xfs/xfs_da_btree.c | |
parent | 509e708a8929c5b75a16c985c03db5329e09cad4 (diff) | |
download | linux-rpi3-b17cb364dbbbf65add79f1610599d01bcb6851f9.tar.gz linux-rpi3-b17cb364dbbbf65add79f1610599d01bcb6851f9.tar.bz2 linux-rpi3-b17cb364dbbbf65add79f1610599d01bcb6851f9.zip |
xfs: fix missing KM_NOFS tags to keep lockdep happy
There are several places where we use KM_SLEEP allocation contexts
and use the fact that they are called from transaction context to
add KM_NOFS where appropriate. Unfortunately, there are several
places where the code makes this assumption but can be called from
outside transaction context but with filesystem locks held. These
places need explicit KM_NOFS annotations to avoid lockdep
complaining about reclaim contexts.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
(cherry picked from commit ac14876cf9255175bf3bdad645bf8aa2b8fb2d7c)
Diffstat (limited to 'fs/xfs/xfs_da_btree.c')
-rw-r--r-- | fs/xfs/xfs_da_btree.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c index 9b26a99ebfe9..41ea7e14a7b6 100644 --- a/fs/xfs/xfs_da_btree.c +++ b/fs/xfs/xfs_da_btree.c @@ -2464,7 +2464,8 @@ xfs_buf_map_from_irec( ASSERT(nirecs >= 1); if (nirecs > 1) { - map = kmem_zalloc(nirecs * sizeof(struct xfs_buf_map), KM_SLEEP); + map = kmem_zalloc(nirecs * sizeof(struct xfs_buf_map), + KM_SLEEP | KM_NOFS); if (!map) return ENOMEM; *mapp = map; @@ -2520,7 +2521,8 @@ xfs_dabuf_map( * Optimize the one-block case. */ if (nfsb != 1) - irecs = kmem_zalloc(sizeof(irec) * nfsb, KM_SLEEP); + irecs = kmem_zalloc(sizeof(irec) * nfsb, + KM_SLEEP | KM_NOFS); nirecs = nfsb; error = xfs_bmapi_read(dp, (xfs_fileoff_t)bno, nfsb, irecs, |