forked from luck/tmp_suning_uos_patched
NFSv4: Fix broken cast in nfs4_callback_recallany()
Passing a pointer to a unsigned integer to test_bit() is broken. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:
parent
af3e79d295
commit
6d243a2356
|
@ -572,7 +572,7 @@ __be32 nfs4_callback_sequence(void *argp, void *resp,
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
validate_bitmap_values(unsigned long mask)
|
validate_bitmap_values(unsigned int mask)
|
||||||
{
|
{
|
||||||
return (mask & ~RCA4_TYPE_MASK_ALL) == 0;
|
return (mask & ~RCA4_TYPE_MASK_ALL) == 0;
|
||||||
}
|
}
|
||||||
|
@ -596,17 +596,15 @@ __be32 nfs4_callback_recallany(void *argp, void *resp,
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
status = cpu_to_be32(NFS4_OK);
|
status = cpu_to_be32(NFS4_OK);
|
||||||
if (test_bit(RCA4_TYPE_MASK_RDATA_DLG, (const unsigned long *)
|
if (args->craa_type_mask & BIT(RCA4_TYPE_MASK_RDATA_DLG))
|
||||||
&args->craa_type_mask))
|
|
||||||
flags = FMODE_READ;
|
flags = FMODE_READ;
|
||||||
if (test_bit(RCA4_TYPE_MASK_WDATA_DLG, (const unsigned long *)
|
if (args->craa_type_mask & BIT(RCA4_TYPE_MASK_WDATA_DLG))
|
||||||
&args->craa_type_mask))
|
|
||||||
flags |= FMODE_WRITE;
|
flags |= FMODE_WRITE;
|
||||||
if (test_bit(RCA4_TYPE_MASK_FILE_LAYOUT, (const unsigned long *)
|
|
||||||
&args->craa_type_mask))
|
|
||||||
pnfs_recall_all_layouts(cps->clp);
|
|
||||||
if (flags)
|
if (flags)
|
||||||
nfs_expire_unused_delegation_types(cps->clp, flags);
|
nfs_expire_unused_delegation_types(cps->clp, flags);
|
||||||
|
|
||||||
|
if (args->craa_type_mask & BIT(RCA4_TYPE_MASK_FILE_LAYOUT))
|
||||||
|
pnfs_recall_all_layouts(cps->clp);
|
||||||
out:
|
out:
|
||||||
dprintk("%s: exit with status = %d\n", __func__, ntohl(status));
|
dprintk("%s: exit with status = %d\n", __func__, ntohl(status));
|
||||||
return status;
|
return status;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user