write-behind: coverity fixes
Fixes CID: 1124360 1291740 1370918 Change-Id: I008c7ade8f9809d040f42f6d3e9af70fff2f3dc6 updates: bz#789278 Signed-off-by: Bhumika Goyal <bgoyal@redhat.com>
This commit is contained in:
parent
bb7d3fbfe1
commit
a3a3b8ec67
@ -197,8 +197,12 @@ __wb_inode_ctx_get (xlator_t *this, inode_t *inode)
|
||||
{
|
||||
uint64_t value = 0;
|
||||
wb_inode_t *wb_inode = NULL;
|
||||
int ret = 0;
|
||||
|
||||
ret = __inode_ctx_get (inode, this, &value);
|
||||
if (ret)
|
||||
return NULL;
|
||||
|
||||
__inode_ctx_get (inode, this, &value);
|
||||
wb_inode = (wb_inode_t *)(unsigned long) value;
|
||||
|
||||
return wb_inode;
|
||||
@ -521,7 +525,7 @@ wb_enqueue_common (wb_inode_t *wb_inode, call_stub_t *stub, int tempted)
|
||||
req->op_ret = req->write_size;
|
||||
req->op_errno = 0;
|
||||
|
||||
if (stub->args.fd->flags & O_APPEND)
|
||||
if (stub->args.fd && (stub->args.fd->flags & O_APPEND))
|
||||
req->ordering.append = 1;
|
||||
}
|
||||
|
||||
@ -2786,7 +2790,7 @@ wb_release (xlator_t *this, fd_t *fd)
|
||||
{
|
||||
uint64_t tmp = 0;
|
||||
|
||||
fd_ctx_del (fd, this, &tmp);
|
||||
(void) fd_ctx_del (fd, this, &tmp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user