瀏覽代碼

[GFS2] Fix bug in directory code

This was a nasty bug which resulted in corruption of hash tables
in the directory code with larger directories. We forgot to
increment a pointer in the read/write routines internal to the
directory code.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Steven Whitehouse 19 年之前
父節點
當前提交
899bb26450
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      fs/gfs2/dir.c

+ 2 - 0
fs/gfs2/dir.c

@@ -215,6 +215,7 @@ static int gfs2_dir_write_data(struct gfs2_inode *ip, const char *buf,
 		if (error)
 			goto fail;
 
+		buf += amount;
 		copied += amount;
 		lblock++;
 		dblock++;
@@ -335,6 +336,7 @@ static int gfs2_dir_read_data(struct gfs2_inode *ip, char *buf,
 		if (error)
 			goto fail;
 
+		buf += amount;
 		copied += amount;
 		lblock++;