提交 b9d22b21 编写于 作者: C chenwei

[Desc] 1, remove redundant code for O_APPEND flag in VfsJffs2Write; 2, fix bug...

[Desc] 1, remove redundant code for O_APPEND flag in VfsJffs2Write; 2, fix bug for access freed memory in VfsJffs2Reclaim

Change-Id: Ibf8a1f352afa0c7ae608431a756ee58cec9bc262
上级 f2ba6f95
......@@ -336,10 +336,6 @@ ssize_t VfsJffs2Write(struct file *filep, const char *buffer, size_t bufLen)
}
}
#endif
// If the APPEND mode bit was supplied, force all writes to
// the end of the file.
if (filep->f_oflags & O_APPEND)
pos = node->i_size;
if (pos < 0) {
LOS_MuxUnlock(&g_jffs2FsLock);
return -EINVAL;
......@@ -714,8 +710,8 @@ int VfsJffs2Reclaim(struct Vnode *pVnode)
return LOS_OK;
}
ret = jffs2_iput(node);
node->i_vnode = NULL;
ret = jffs2_iput(node);
LOS_MuxUnlock(&g_jffs2FsLock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册