[Ocfs2-devel] Maybe a null point bug in __ocfs2_change_file_space.

Chang Limin changlimin at h3c.com
Thu Apr 12 20:32:57 PDT 2012


Hi,
 Version linux-3.3
In function
static long ocfs2_fallocate(struct file *file, int mode, loff_t offset,
                        loff_t len)
{
…
return __ocfs2_change_file_space(NULL, inode, offset, cmd, &sr,           // file is NULL
                                        change_size);
}

In function
static int __ocfs2_change_file_space(struct file *file, struct inode *inode,
                                  loff_t f_pos, unsigned int cmd,
                                  struct ocfs2_space_resv *sr,
                                  int change_size)
{
if (file->f_flags & O_SYNC)                                                                                   // access file->f_flags result null pointer
           handle->h_sync = 1;
}

Changlimin

-------------------------------------------------------------------------------------------------------------------------------------
本邮件及其附件含有杭州华三通信技术有限公司的保密信息,仅限于发送给上面地址中列出
的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
邮件!
This e-mail and its attachments contain confidential information from H3C, which is
intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
by phone or email immediately and delete it!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20120413/8172e23a/attachment-0001.html 


More information about the Ocfs2-devel mailing list