summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/dir.h
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2014-09-29 14:52:04 +0200
committerSteven Whitehouse <swhiteho@redhat.com>2014-10-01 15:06:15 +0200
commit19aeb5a65f1a6504fc665466c188241e7393d66f (patch)
treeed2f2cb66536ab4dfa5b1c2bffe9780889ad369c /fs/gfs2/dir.h
parentGFS2: fix bad inode i_goal values during block allocation (diff)
downloadlinux-19aeb5a65f1a6504fc665466c188241e7393d66f.tar.xz
linux-19aeb5a65f1a6504fc665466c188241e7393d66f.zip
GFS2: Make rename not save dirent location
This patch fixes a regression in the patch "GFS2: Remember directory insert point", commit 2b47dad866d04f14c328f888ba5406057b8c7d33. The problem had to do with the rename function: The function found space for the new dirent, and remembered that location. But then the old dirent was removed, which often moved the eligible location for the renamed dirent. Putting the new dirent at the saved location caused file system corruption. This patch adds a new "save_loc" variable to struct gfs2_diradd. If 1, the dirent location is saved. If 0, the dirent location is not saved and the buffer_head is released as per previous behavior. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/dir.h')
-rw-r--r--fs/gfs2/dir.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/gfs2/dir.h b/fs/gfs2/dir.h
index 126c65dda028..e1b309c24dab 100644
--- a/fs/gfs2/dir.h
+++ b/fs/gfs2/dir.h
@@ -23,6 +23,7 @@ struct gfs2_diradd {
unsigned nr_blocks;
struct gfs2_dirent *dent;
struct buffer_head *bh;
+ int save_loc;
};
extern struct inode *gfs2_dir_search(struct inode *dir,