]> git.baikalelectronics.ru Git - kernel.git/commit
logfs: destroy the reserved inodes while unmounting
authorPrasad Joshi <prasadjoshi.linux@gmail.com>
Fri, 9 Mar 2012 00:57:12 +0000 (06:27 +0530)
committerPrasad Joshi <prasadjoshi.linux@gmail.com>
Mon, 2 Apr 2012 03:50:33 +0000 (09:20 +0530)
commit6a774e2a0399463943516d8edb3d121628fc7d61
tree1b64355958937bd425901f950342be58fa2a6286
parent23483fa309e02a0d8c26b9756cf0d50b8a9df655
logfs: destroy the reserved inodes while unmounting

We were assuming that the evict_inode() would never be called on
reserved inodes. However, (after the commit 77d2acb52 logfs: get rid
of magical inodes) while unmounting the file system, in put_super, we
call iput() on all of the reserved inodes.

The following simple test used to cause a kernel panic on LogFS:

1. Mount a LogFS file system on /mnt

2. Create a file
   $ touch /mnt/a

3. Try to unmount the FS
   $ umount /mnt

The simple fix would be to drop the assumption and properly destroy
the reserved inodes.

Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
fs/logfs/inode.c
fs/logfs/readwrite.c
fs/logfs/segment.c