]> git.baikalelectronics.ru Git - kernel.git/commit
nfs: Check whether a layout pointer is NULL before free it
authorYanchuan Nian <ycnian@gmail.com>
Wed, 31 Oct 2012 08:05:48 +0000 (16:05 +0800)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 31 Oct 2012 20:26:25 +0000 (16:26 -0400)
commit336b084744906adf52546fe752a49757a23a3ba5
tree487e9206cc31f1a214ee43771325193abb4a2b89
parentaf7f619d0cdec48f24f0999993734cab0acf39eb
nfs: Check whether a layout pointer is NULL before free it

The new layout pointer in pnfs_find_alloc_layout() may be NULL because of
out of memory. we must do some check work, otherwise pnfs_free_layout_hdr()
will go wrong because it can not deal with a NULL pointer.

Signed-off-by: Yanchuan Nian <ycnian@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/pnfs.c