[Desc] 1, remove redundant code for O_APPEND flag in VfsJffs2Write; 2, fix bug for access freed memory in VfsJffs2Reclaim
Change-Id: Ibf8a1f352afa0c7ae608431a756ee58cec9bc262
This commit is contained in:
parent
f2ba6f956e
commit
b9d22b21e8
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue