diff options
author | Andrzej Jakowski <andrzej.jakowski@intel.com> | 2016-07-27 12:17:24 -0700 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-07-27 13:32:35 -0600 |
commit | ba5957d07cac94a0c3f24f1f97003256908b5356 (patch) | |
tree | d462d03801b7ec83ad889fb708c45414bd20f9dc | |
parent | 77412dffcdaf030b48567dff77ca8cbbe2120913 (diff) |
Fix resource leak in the STREAM_CLOSE path.io-streamid
Allocated stream identifier (alloc_id) nor closed stream_id has never
been deallocated in the STREAM_CLOSE path, causing issues when closed
stream was reopened again. This patch fixes that problem.
Signed-off-by: Andrzej Jakowski <andrzej.jakowski@intel.com>
Signed-off-by: Kapil Karkra <kapil.karkra@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r-- | fs/read_write.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/read_write.c b/fs/read_write.c index 7218d69b1763..6ad3dc5cea4d 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -1737,6 +1737,8 @@ SYSCALL_DEFINE4(streamid, int, fd, int, cmd, inode->i_streamid = 0; spin_unlock(&inode->i_lock); } + bdi_streamid(f.file->f_mapping->host, STREAMID_CLOSE, alloc_id); + bdi_streamid(f.file->f_mapping->host, STREAMID_CLOSE, streamid); } done: |