summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/ioctl.c
diff options
context:
space:
mode:
authorWengang Wang <wen.gang.wang@oracle.com>2011-07-12 10:43:14 +0200
committerJoel Becker <jlbec@evilplan.org>2011-11-17 10:46:46 +0100
commit8298524803339a9a8df053ebdfebc2975ec55be9 (patch)
tree2bea3c08eac9239ea596707fadfefed7f1bab2d7 /fs/ocfs2/ioctl.c
parentfs/ocfs2/dlm/dlmlock.c: free kmem_cache_zalloc'd data using kmem_cache_free (diff)
downloadlinux-8298524803339a9a8df053ebdfebc2975ec55be9.tar.xz
linux-8298524803339a9a8df053ebdfebc2975ec55be9.zip
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>
Diffstat (limited to 'fs/ocfs2/ioctl.c')
0 files changed, 0 insertions, 0 deletions