[PATCH] hpfs: new/read/write_inode() cleanups
1) common initialization for all paths in hpfs_read_inode() taken into a separate helper (hpfs_init_inode()) 2) hpfs mkdir(),create(),mknod() and symlink() do not bother with iget() anymore - they call new_inode(), do initializations and insert new inode into icache. Handling of OOM failures cleaned up - if we can't allocate in-core inode, bail instead of corrupting the filesystem. Allocating in-core inode early also avoids one of the deadlocks here (hpfs_write_inode() from memory pressure by kmem_cache_alloc() could deadlock on attempt to lock our directory). 3) hpfs_write_inode() marks the inode dirty again in case if it fails to iget() its parent directory. Again, OOM could trigger fs corruption here.
Showing
This diff is collapsed.
Please register or sign in to comment