* [PATCH v2 2/2] btrfs: declare rsv_count as unsigned int instead of int
@ 2015-09-22 21:00 Alexandru Moise
2015-09-23 12:58 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Alexandru Moise @ 2015-09-22 21:00 UTC (permalink / raw)
To: clm; +Cc: jbacik, dsterba, linux-btrfs, linux-kernel, 00moses.alexander00
rsv_count ultimately gets passed to start_transaction() which
now takes an unsigned int as its num_items parameter.
The value of rsv_count should always be positive so declare it
as being unsigned.
Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com>
---
v2: followed dave's suggestions of all num_items equivalents to be
unsigned ints.
fs/btrfs/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index b823fac..6af5103 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -2266,7 +2266,7 @@ static int btrfs_punch_hole(struct inode *inode, loff_t offset, loff_t len)
u64 drop_end;
int ret = 0;
int err = 0;
- int rsv_count;
+ unsigned int rsv_count;
bool same_page;
bool no_holes = btrfs_fs_incompat(root->fs_info, NO_HOLES);
u64 ino_size;
--
2.5.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 2/2] btrfs: declare rsv_count as unsigned int instead of int
2015-09-22 21:00 [PATCH v2 2/2] btrfs: declare rsv_count as unsigned int instead of int Alexandru Moise
@ 2015-09-23 12:58 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2015-09-23 12:58 UTC (permalink / raw)
To: Alexandru Moise; +Cc: clm, jbacik, dsterba, linux-btrfs, linux-kernel
On Tue, Sep 22, 2015 at 09:00:07PM +0000, Alexandru Moise wrote:
> rsv_count ultimately gets passed to start_transaction() which
> now takes an unsigned int as its num_items parameter.
> The value of rsv_count should always be positive so declare it
> as being unsigned.
>
> Signed-off-by: Alexandru Moise <00moses.alexander00@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-23 12:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-22 21:00 [PATCH v2 2/2] btrfs: declare rsv_count as unsigned int instead of int Alexandru Moise
2015-09-23 12:58 ` David Sterba
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.