linux/fs/ocfs2
Wengang Wang 8298524803 ocfs2: make direntry invalid when deleting it
When we deleting a direntry from a directory, if it's the first in a block we
invalid it by setting inode to 0; otherwise, we merge the deleted one to the
prior and contiguous direntry. And we don't truncate directories.

There is a problem for the later case since inode is not set to 0.
This problem happens when the caller passes a file position as parameter to
ocfs2_dir_foreach_blk(). If the position happens to point to a stale(not
the first, deleted in betweens of ocfs2_dir_foreach_blk()s) direntry, we are
not able to recognize its staleness. So that we treat it as a live one wrongly.

The fix is to set inode to 0 in both cases indicating the direntry is stale.
This won't introduce additional IOs.

Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
2011-11-17 01:46:46 -08:00
..
cluster ocfs2/cluster: Add new function o2net_fill_node_map() 2011-07-24 10:32:54 -07:00
dlm fs/ocfs2/dlm/dlmlock.c: free kmem_cache_zalloc'd data using kmem_cache_free 2011-11-17 01:46:46 -08:00
dlmfs ocfs2: change incorrect 'extern' keyword to 'static' in dlmfs 2011-05-23 23:59:40 -07:00
Kconfig
Makefile Ocfs2/move_extents: Add basic framework and source files for extent moving. 2011-05-25 15:17:08 +08:00
acl.c ->permission() sanitizing: don't pass flags to ->check_acl() 2011-07-20 01:43:21 -04:00
acl.h ->permission() sanitizing: don't pass flags to ->check_acl() 2011-07-20 01:43:21 -04:00
alloc.c ocfs2: Add trace event for trim. 2011-05-23 23:37:20 -07:00
alloc.h ocfs2: Add ocfs2_trim_fs for SSD trim support. 2011-05-23 23:37:18 -07:00
aops.c Merge branch 'mw-3.1-jul25' of git://oss.oracle.com/git/smushran/linux-2.6 into ocfs2-fixes 2011-08-21 21:02:57 -07:00
aops.h ocfs2: serialize unaligned aio 2011-07-28 02:07:16 -07:00
blockcheck.c
blockcheck.h
buffer_head_io.c
buffer_head_io.h
dcache.c ocfs2: fix d_revalidate oopsen on NFS exports 2011-03-10 03:45:07 -05:00
dcache.h
dir.c ocfs2: make direntry invalid when deleting it 2011-11-17 01:46:46 -08:00
dir.h
dlmglue.c ocfs2: Bugfix for hard readonly mount 2011-05-31 19:03:44 -07:00
dlmglue.h
export.c exportfs: Return the minimum required handle size 2011-03-14 09:15:28 -04:00
export.h
extent_map.c ocfs2: Implement llseek() 2011-07-25 14:58:15 -07:00
extent_map.h ocfs2: Implement llseek() 2011-07-25 14:58:15 -07:00
file.c Merge branch 'mw-3.1-jul25' of git://oss.oracle.com/git/smushran/linux-2.6 into ocfs2-fixes 2011-08-21 21:02:57 -07:00
file.h ->permission() sanitizing: don't pass flags to ->permission() 2011-07-20 01:43:24 -04:00
heartbeat.c
heartbeat.h
inode.c Fix common misspellings 2011-03-31 11:26:23 -03:00
inode.h ocfs2: serialize unaligned aio 2011-07-28 02:07:16 -07:00
ioctl.c ocfs2: null deref on allocation error 2011-05-31 19:03:45 -07:00
ioctl.h
journal.c ocfs2: Add comment about orphan scanning 2011-07-24 10:35:54 -07:00
journal.h Fix common misspellings 2011-03-31 11:26:23 -03:00
localalloc.c
localalloc.h
locks.c
locks.h
mmap.c ocfs2: Fix ocfs2_page_mkwrite() 2011-07-24 10:36:54 -07:00
mmap.h
move_extents.c ocfs2: checking the wrong variable in ocfs2_move_extent() 2011-05-31 19:03:44 -07:00
move_extents.h Ocfs2/move_extents: move/defrag extents within a certain range. 2011-05-25 15:17:12 +08:00
namei.c kill check_acl callback of generic_permission() 2011-07-20 01:43:16 -04:00
namei.h
ocfs1_fs_compat.h
ocfs2.h ocfs2: use proper little-endian bitops 2011-05-31 19:03:45 -07:00
ocfs2_fs.h Revert wrong fixes for common misspellings 2011-04-26 23:31:11 -07:00
ocfs2_ioctl.h Ocfs2/move_extents: Adding new ioctl code 'OCFS2_IOC_MOVE_EXT' to ocfs2. 2011-05-25 15:17:08 +08:00
ocfs2_lockid.h
ocfs2_lockingver.h
ocfs2_trace.h ocfs2: Add trace event for trim. 2011-05-23 23:37:20 -07:00
quota.h
quota_global.c Fix common misspellings 2011-03-31 11:26:23 -03:00
quota_local.c ocfs2: Clean up messages in the fs 2011-07-24 10:34:54 -07:00
refcounttree.c new helpers: kern_path_create/user_path_create 2011-07-20 01:44:05 -04:00
refcounttree.h Ocfs2/refcounttree: Publicize couple of funcs from refcounttree.c 2011-05-25 15:17:08 +08:00
reservations.c
reservations.h Fix common misspellings 2011-03-31 11:26:23 -03:00
resize.c
resize.h
slot_map.c ocfs2: Clean up messages in the fs 2011-07-24 10:34:54 -07:00
slot_map.h
stack_o2cb.c ocfs2/cluster: Cluster up now includes network connections too 2011-07-24 10:33:54 -07:00
stack_user.c
stackglue.c
stackglue.h Fix common misspellings 2011-03-31 11:26:23 -03:00
suballoc.c Fix common misspellings 2011-03-31 11:26:23 -03:00
suballoc.h
super.c Merge branch 'mw-3.1-jul25' of git://oss.oracle.com/git/smushran/linux-2.6 into ocfs2-fixes 2011-08-21 21:02:57 -07:00
super.h
symlink.c
symlink.h
sysfile.c
sysfile.h
uptodate.c
uptodate.h
ver.c
ver.h
xattr.c Fix common misspellings 2011-03-31 11:26:23 -03:00
xattr.h