[Ocfs2-devel] [PATCH 1/1] ocfs2: Fix oops in fallocate()

Sunil Mushran sunil.mushran at oracle.com
Mon Jan 30 13:53:21 PST 2012


fallocate() was oopsing on ocfs2 because we were passing in a
NULL file pointer.

Signed-off-by: Sunil Mushran <sunil.mushran at oracle.com>
---
 fs/ocfs2/file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 061591a..8f30e74 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2012,7 +2012,7 @@ static long ocfs2_fallocate(struct file *file, int mode, loff_t offset,
 	sr.l_start = (s64)offset;
 	sr.l_len = (s64)len;
 
-	return __ocfs2_change_file_space(NULL, inode, offset, cmd, &sr,
+	return __ocfs2_change_file_space(file, inode, offset, cmd, &sr,
 					 change_size);
 }
 
-- 
1.7.7.6




More information about the Ocfs2-devel mailing list