提交 1763f378 编写于 作者: O openharmony_ci 提交者: Gitee

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

!99 [Desc] 1, remove redundant code for O_APPEND flag in VfsJffs2Write; 2, fix bug for access freed memory in VfsJffs2Reclaim
Merge pull request !99 from LeonChan/master
......@@ -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.
先完成此消息的编辑!
想要评论请 注册