mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 22:21:42 +00:00
NFS: Fix compiler warnings
The "struct inode *inode" was only used in a dprintk, so compiling with CONFIG_SUNRPC_DEBUG off triggers a warning. To get around this, I remove the "struct inode *inode" variable and instead change the dprintk()s to use hdr->inode instead. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
bd4aeffb5b
commit
497826af60
@ -85,15 +85,14 @@ filelayout_get_dserver_offset(struct pnfs_layout_segment *lseg, loff_t offset)
|
|||||||
static void filelayout_reset_write(struct nfs_write_data *data)
|
static void filelayout_reset_write(struct nfs_write_data *data)
|
||||||
{
|
{
|
||||||
struct nfs_pgio_header *hdr = data->header;
|
struct nfs_pgio_header *hdr = data->header;
|
||||||
struct inode *inode = hdr->inode;
|
|
||||||
struct rpc_task *task = &data->task;
|
struct rpc_task *task = &data->task;
|
||||||
|
|
||||||
if (!test_and_set_bit(NFS_IOHDR_REDO, &hdr->flags)) {
|
if (!test_and_set_bit(NFS_IOHDR_REDO, &hdr->flags)) {
|
||||||
dprintk("%s Reset task %5u for i/o through MDS "
|
dprintk("%s Reset task %5u for i/o through MDS "
|
||||||
"(req %s/%lld, %u bytes @ offset %llu)\n", __func__,
|
"(req %s/%lld, %u bytes @ offset %llu)\n", __func__,
|
||||||
data->task.tk_pid,
|
data->task.tk_pid,
|
||||||
inode->i_sb->s_id,
|
hdr->inode->i_sb->s_id,
|
||||||
(long long)NFS_FILEID(inode),
|
(long long)NFS_FILEID(hdr->inode),
|
||||||
data->args.count,
|
data->args.count,
|
||||||
(unsigned long long)data->args.offset);
|
(unsigned long long)data->args.offset);
|
||||||
|
|
||||||
@ -106,15 +105,14 @@ static void filelayout_reset_write(struct nfs_write_data *data)
|
|||||||
static void filelayout_reset_read(struct nfs_read_data *data)
|
static void filelayout_reset_read(struct nfs_read_data *data)
|
||||||
{
|
{
|
||||||
struct nfs_pgio_header *hdr = data->header;
|
struct nfs_pgio_header *hdr = data->header;
|
||||||
struct inode *inode = hdr->inode;
|
|
||||||
struct rpc_task *task = &data->task;
|
struct rpc_task *task = &data->task;
|
||||||
|
|
||||||
if (!test_and_set_bit(NFS_IOHDR_REDO, &hdr->flags)) {
|
if (!test_and_set_bit(NFS_IOHDR_REDO, &hdr->flags)) {
|
||||||
dprintk("%s Reset task %5u for i/o through MDS "
|
dprintk("%s Reset task %5u for i/o through MDS "
|
||||||
"(req %s/%lld, %u bytes @ offset %llu)\n", __func__,
|
"(req %s/%lld, %u bytes @ offset %llu)\n", __func__,
|
||||||
data->task.tk_pid,
|
data->task.tk_pid,
|
||||||
inode->i_sb->s_id,
|
hdr->inode->i_sb->s_id,
|
||||||
(long long)NFS_FILEID(inode),
|
(long long)NFS_FILEID(hdr->inode),
|
||||||
data->args.count,
|
data->args.count,
|
||||||
(unsigned long long)data->args.offset);
|
(unsigned long long)data->args.offset);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user