Re: [PATCH] xfs: do not call xfs_buf_hash_destroy on a NULL pag

2017-01-24 Thread Darrick J. Wong
On Tue, Jan 24, 2017 at 09:04:57AM -0600, Bill O'Donnell wrote: > On Fri, Jan 20, 2017 at 11:04:42PM +, Colin Ian King wrote: > > On 20/01/17 20:47, Darrick J. Wong wrote: > > > On Fri, Jan 20, 2017 at 01:26:12PM -0600, Eric Sandeen wrote: > > >> On 1/20/17 8:26 AM, Colin King wrote: > > >>> Fr

Re: [PATCH] xfs: do not call xfs_buf_hash_destroy on a NULL pag

2017-01-24 Thread Bill O'Donnell
On Fri, Jan 20, 2017 at 11:04:42PM +, Colin Ian King wrote: > On 20/01/17 20:47, Darrick J. Wong wrote: > > On Fri, Jan 20, 2017 at 01:26:12PM -0600, Eric Sandeen wrote: > >> On 1/20/17 8:26 AM, Colin King wrote: > >>> From: Colin Ian King > >>> > >>> If pag cannot be allocated, the current er

Re: [PATCH] xfs: do not call xfs_buf_hash_destroy on a NULL pag

2017-01-20 Thread Colin Ian King
On 20/01/17 20:47, Darrick J. Wong wrote: > On Fri, Jan 20, 2017 at 01:26:12PM -0600, Eric Sandeen wrote: >> On 1/20/17 8:26 AM, Colin King wrote: >>> From: Colin Ian King >>> >>> If pag cannot be allocated, the current error exit path will trip >>> a null pointer deference error when calling xfs_

Re: [PATCH] xfs: do not call xfs_buf_hash_destroy on a NULL pag

2017-01-20 Thread Darrick J. Wong
On Fri, Jan 20, 2017 at 01:26:12PM -0600, Eric Sandeen wrote: > On 1/20/17 8:26 AM, Colin King wrote: > > From: Colin Ian King > > > > If pag cannot be allocated, the current error exit path will trip > > a null pointer deference error when calling xfs_buf_hash_destroy > > with a null pag. Fix t

Re: [PATCH] xfs: do not call xfs_buf_hash_destroy on a NULL pag

2017-01-20 Thread Eric Sandeen
On 1/20/17 8:26 AM, Colin King wrote: > From: Colin Ian King > > If pag cannot be allocated, the current error exit path will trip > a null pointer deference error when calling xfs_buf_hash_destroy > with a null pag. Fix this by adding a new error exit lable and > jumping to this, avoiding the h

Re: [PATCH] xfs: do not call xfs_buf_hash_destroy on a NULL pag

2017-01-20 Thread Darrick J. Wong
On Fri, Jan 20, 2017 at 02:26:42PM +, Colin King wrote: > From: Colin Ian King > > If pag cannot be allocated, the current error exit path will trip > a null pointer deference error when calling xfs_buf_hash_destroy > with a null pag. Fix this by adding a new error exit lable and > jumping t

[PATCH] xfs: do not call xfs_buf_hash_destroy on a NULL pag

2017-01-20 Thread Colin King
From: Colin Ian King If pag cannot be allocated, the current error exit path will trip a null pointer deference error when calling xfs_buf_hash_destroy with a null pag. Fix this by adding a new error exit lable and jumping to this, avoiding the hash destroy and unnecessary kmem_free on pag. Fix