summaryrefslogtreecommitdiffstats
path: root/fs/ntfs/dir.c
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2011-07-27 17:51:53 -0700
committerBoaz Harrosh <bharrosh@panasas.com>2011-08-04 12:35:20 -0700
commit6d4073e88132259485ef1b2c88daa5e50c95789c (patch)
tree04876cbe47e462bca7dad51ec33ccb29080d5680 /fs/ntfs/dir.c
parent26ae93c2dc7152463d319c28768f242a11a54620 (diff)
downloadop-kernel-dev-6d4073e88132259485ef1b2c88daa5e50c95789c.zip
op-kernel-dev-6d4073e88132259485ef1b2c88daa5e50c95789c.tar.gz
exofs: BUG: Avoid sbi realloc
Since the beginning we realloced the sbi structure when a bigger then one device table was specified. (I know that was really stupid). Then much later when "register bdi" was added (By Jens) it was registering the pointer to sbi->bdi before the realloc. We never saw this problem because up till now the realloc did not do anything since the device table was small enough to fit in the original allocation. But once we starting testing with large device tables (Bigger then 28) we noticed the crash of writeback operating on a deallocated pointer. * Avoid the all mess by allocating the device-table as a second array and get rid of the variable-sized structure and the rest of this mess. * Take the chance to clean near by structures and comments. * Add a needed dprint on startup to indicate the loaded layout. * Also move the bdi registration to the very end because it will only fail in a low memory, which will probably fail before hand. There are many more likely causes to not load before that. This way the error handling is made simpler. (Just doing this would be enough to fix the BUG) Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Diffstat (limited to 'fs/ntfs/dir.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud