Skip to content

Commit

Permalink
quota: Use the pre-processor to compile out quotactl_cmd_write when !…
Browse files Browse the repository at this point in the history
…CONFIG_BLOCK

quotactl_cmd_write() is only ever invoked when BLOCK is configured. When
!CONFIG_BLOCK, the build warning below is displayed. Let's fix that.

fs/quota/quota.c:311:12: warning: ‘quotactl_cmd_write’ defined but not used [-Wunused-function]

Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jan Kara <jack@suse.cz>
  • Loading branch information
Lee Jones authored and Jan Kara committed Dec 13, 2012
1 parent 4789775 commit 56df127
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/quota/quota.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@ static int do_quotactl(struct super_block *sb, int type, int cmd, qid_t id,
}
}

#ifdef CONFIG_BLOCK

/* Return 1 if 'cmd' will block on frozen filesystem */
static int quotactl_cmd_write(int cmd)
{
Expand All @@ -322,6 +324,8 @@ static int quotactl_cmd_write(int cmd)
return 1;
}

#endif /* CONFIG_BLOCK */

/*
* look up a superblock on which quota ops will be performed
* - use the name of a block device to find the superblock thereon
Expand Down

0 comments on commit 56df127

Please sign in to comment.