Re: [ndctl PATCH] ndctl: fix ordering of closing vs invalidating flush_fd

2018-04-16 Thread Dave Jiang
On 04/16/2018 10:03 AM, Vishal Verma wrote: > Static analysis warns that we may be closing a negative 'fd'. Fix this > by closing before invalidating the flush_fd with a -1 in add_region() > > Fixes: commit c64cc15 ("ndctl: add support in libndctl to provide deep flush") > Cc: Dave Jiang

[ndctl PATCH] ndctl: fix ordering of closing vs invalidating flush_fd

2018-04-16 Thread Vishal Verma
Static analysis warns that we may be closing a negative 'fd'. Fix this by closing before invalidating the flush_fd with a -1 in add_region() Fixes: commit c64cc15 ("ndctl: add support in libndctl to provide deep flush") Cc: Dave Jiang Signed-off-by: Vishal Verma