mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 02:09:42 +00:00
Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6
Pull cifs fixes from Steve French: "Various small fixes for stable" * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: CIFS: Fix some return values in case of error in 'crypt_message' cifs: remove redundant return in cifs_creation_time_get CIFS: Improve readdir verbosity CIFS: check if pages is null rather than bv for a failed allocation CIFS: Set ->should_dirty in cifs_user_readv()
This commit is contained in:
commit
a38371cba6
5 changed files with 14 additions and 9 deletions
|
@ -3271,7 +3271,7 @@ ssize_t cifs_user_readv(struct kiocb *iocb, struct iov_iter *to)
|
|||
if (!is_sync_kiocb(iocb))
|
||||
ctx->iocb = iocb;
|
||||
|
||||
if (to->type & ITER_IOVEC)
|
||||
if (to->type == ITER_IOVEC)
|
||||
ctx->should_dirty = true;
|
||||
|
||||
rc = setup_aio_ctx_iter(ctx, to, READ);
|
||||
|
|
|
@ -810,7 +810,7 @@ setup_aio_ctx_iter(struct cifs_aio_ctx *ctx, struct iov_iter *iter, int rw)
|
|||
|
||||
if (!pages) {
|
||||
pages = vmalloc(max_pages * sizeof(struct page *));
|
||||
if (!bv) {
|
||||
if (!pages) {
|
||||
kvfree(bv);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
|
|
@ -849,8 +849,13 @@ cifs_query_dir_first(const unsigned int xid, struct cifs_tcon *tcon,
|
|||
struct cifs_fid *fid, __u16 search_flags,
|
||||
struct cifs_search_info *srch_inf)
|
||||
{
|
||||
return CIFSFindFirst(xid, tcon, path, cifs_sb,
|
||||
&fid->netfid, search_flags, srch_inf, true);
|
||||
int rc;
|
||||
|
||||
rc = CIFSFindFirst(xid, tcon, path, cifs_sb,
|
||||
&fid->netfid, search_flags, srch_inf, true);
|
||||
if (rc)
|
||||
cifs_dbg(FYI, "find first failed=%d\n", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
@ -982,7 +982,7 @@ smb2_query_dir_first(const unsigned int xid, struct cifs_tcon *tcon,
|
|||
rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL);
|
||||
kfree(utf16_path);
|
||||
if (rc) {
|
||||
cifs_dbg(VFS, "open dir failed\n");
|
||||
cifs_dbg(FYI, "open dir failed rc=%d\n", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -992,7 +992,7 @@ smb2_query_dir_first(const unsigned int xid, struct cifs_tcon *tcon,
|
|||
rc = SMB2_query_directory(xid, tcon, fid->persistent_fid,
|
||||
fid->volatile_fid, 0, srch_inf);
|
||||
if (rc) {
|
||||
cifs_dbg(VFS, "query directory failed\n");
|
||||
cifs_dbg(FYI, "query directory failed rc=%d\n", rc);
|
||||
SMB2_close(xid, tcon, fid->persistent_fid, fid->volatile_fid);
|
||||
}
|
||||
return rc;
|
||||
|
@ -1809,7 +1809,8 @@ crypt_message(struct TCP_Server_Info *server, struct smb_rqst *rqst, int enc)
|
|||
|
||||
sg = init_sg(rqst, sign);
|
||||
if (!sg) {
|
||||
cifs_dbg(VFS, "%s: Failed to init sg %d", __func__, rc);
|
||||
cifs_dbg(VFS, "%s: Failed to init sg", __func__);
|
||||
rc = -ENOMEM;
|
||||
goto free_req;
|
||||
}
|
||||
|
||||
|
@ -1817,6 +1818,7 @@ crypt_message(struct TCP_Server_Info *server, struct smb_rqst *rqst, int enc)
|
|||
iv = kzalloc(iv_len, GFP_KERNEL);
|
||||
if (!iv) {
|
||||
cifs_dbg(VFS, "%s: Failed to alloc IV", __func__);
|
||||
rc = -ENOMEM;
|
||||
goto free_sg;
|
||||
}
|
||||
iv[0] = 3;
|
||||
|
|
|
@ -188,8 +188,6 @@ static int cifs_creation_time_get(struct dentry *dentry, struct inode *inode,
|
|||
pcreatetime = (__u64 *)value;
|
||||
*pcreatetime = CIFS_I(inode)->createtime;
|
||||
return sizeof(__u64);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue