All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 2/2] jbd2: use gfp_t instead of int
@ 2011-08-26  9:20 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2011-08-26  9:20 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: open list:JOURNALLING LAYER..., kernel-janitors

This silences some Sparse warnings:
fs/jbd2/transaction.c:135:69: warning: incorrect type in argument 2 (different base types)
fs/jbd2/transaction.c:135:69:    expected restricted gfp_t [usertype] flags
fs/jbd2/transaction.c:135:69:    got int [signed] gfp_mask

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index 38f307b..3dd101e 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -1106,9 +1106,9 @@ static inline handle_t *journal_current_handle(void)
  */
 
 extern handle_t *jbd2_journal_start(journal_t *, int nblocks);
-extern handle_t *jbd2__journal_start(journal_t *, int nblocks, int gfp_mask);
+extern handle_t *jbd2__journal_start(journal_t *, int nblocks, gfp_t gfp_mask);
 extern int	 jbd2_journal_restart(handle_t *, int nblocks);
-extern int	 jbd2__journal_restart(handle_t *, int nblocks, int gfp_mask);
+extern int	 jbd2__journal_restart(handle_t *, int nblocks, gfp_t gfp_mask);
 extern int	 jbd2_journal_extend (handle_t *, int nblocks);
 extern int	 jbd2_journal_get_write_access(handle_t *, struct buffer_head *);
 extern int	 jbd2_journal_get_create_access (handle_t *, struct buffer_head *);
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 8d7013c..9fc049d 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -115,7 +115,7 @@ static inline void update_t_max_wait(transaction_t *transaction,
  */
 
 static int start_this_handle(journal_t *journal, handle_t *handle,
-			     int gfp_mask)
+			     gfp_t gfp_mask)
 {
 	transaction_t	*transaction, *new_transaction = NULL;
 	tid_t		tid;
@@ -320,7 +320,7 @@ static handle_t *new_handle(int nblocks)
  * Return a pointer to a newly allocated handle, or an ERR_PTR() value
  * on failure.
  */
-handle_t *jbd2__journal_start(journal_t *journal, int nblocks, int gfp_mask)
+handle_t *jbd2__journal_start(journal_t *journal, int nblocks, gfp_t gfp_mask)
 {
 	handle_t *handle = journal_current_handle();
 	int err;
@@ -443,7 +443,7 @@ out:
  * transaction capabable of guaranteeing the requested number of
  * credits.
  */
-int jbd2__journal_restart(handle_t *handle, int nblocks, int gfp_mask)
+int jbd2__journal_restart(handle_t *handle, int nblocks, gfp_t gfp_mask)
 {
 	transaction_t *transaction = handle->h_transaction;
 	journal_t *journal = transaction->t_journal;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [patch 2/2] jbd2: use gfp_t instead of int
@ 2011-08-26  9:20 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2011-08-26  9:20 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: open list:JOURNALLING LAYER..., kernel-janitors

This silences some Sparse warnings:
fs/jbd2/transaction.c:135:69: warning: incorrect type in argument 2 (different base types)
fs/jbd2/transaction.c:135:69:    expected restricted gfp_t [usertype] flags
fs/jbd2/transaction.c:135:69:    got int [signed] gfp_mask

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index 38f307b..3dd101e 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -1106,9 +1106,9 @@ static inline handle_t *journal_current_handle(void)
  */
 
 extern handle_t *jbd2_journal_start(journal_t *, int nblocks);
-extern handle_t *jbd2__journal_start(journal_t *, int nblocks, int gfp_mask);
+extern handle_t *jbd2__journal_start(journal_t *, int nblocks, gfp_t gfp_mask);
 extern int	 jbd2_journal_restart(handle_t *, int nblocks);
-extern int	 jbd2__journal_restart(handle_t *, int nblocks, int gfp_mask);
+extern int	 jbd2__journal_restart(handle_t *, int nblocks, gfp_t gfp_mask);
 extern int	 jbd2_journal_extend (handle_t *, int nblocks);
 extern int	 jbd2_journal_get_write_access(handle_t *, struct buffer_head *);
 extern int	 jbd2_journal_get_create_access (handle_t *, struct buffer_head *);
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 8d7013c..9fc049d 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -115,7 +115,7 @@ static inline void update_t_max_wait(transaction_t *transaction,
  */
 
 static int start_this_handle(journal_t *journal, handle_t *handle,
-			     int gfp_mask)
+			     gfp_t gfp_mask)
 {
 	transaction_t	*transaction, *new_transaction = NULL;
 	tid_t		tid;
@@ -320,7 +320,7 @@ static handle_t *new_handle(int nblocks)
  * Return a pointer to a newly allocated handle, or an ERR_PTR() value
  * on failure.
  */
-handle_t *jbd2__journal_start(journal_t *journal, int nblocks, int gfp_mask)
+handle_t *jbd2__journal_start(journal_t *journal, int nblocks, gfp_t gfp_mask)
 {
 	handle_t *handle = journal_current_handle();
 	int err;
@@ -443,7 +443,7 @@ out:
  * transaction capabable of guaranteeing the requested number of
  * credits.
  */
-int jbd2__journal_restart(handle_t *handle, int nblocks, int gfp_mask)
+int jbd2__journal_restart(handle_t *handle, int nblocks, gfp_t gfp_mask)
 {
 	transaction_t *transaction = handle->h_transaction;
 	journal_t *journal = transaction->t_journal;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [patch 2/2] jbd2: use gfp_t instead of int
  2011-08-26  9:20 ` Dan Carpenter
@ 2011-10-31 17:53   ` Ted Ts'o
  -1 siblings, 0 replies; 4+ messages in thread
From: Ted Ts'o @ 2011-10-31 17:53 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: open list:JOURNALLING LAYER..., kernel-janitors

On Fri, Aug 26, 2011 at 12:20:37PM +0300, Dan Carpenter wrote:
> This silences some Sparse warnings:
> fs/jbd2/transaction.c:135:69: warning: incorrect type in argument 2 (different base types)
> fs/jbd2/transaction.c:135:69:    expected restricted gfp_t [usertype] flags
> fs/jbd2/transaction.c:135:69:    got int [signed] gfp_mask
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

This has been merged into the ext4 tree (a while ago, actually, but it
looks like I forgot to send an e-mail ack).

					- Ted

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch 2/2] jbd2: use gfp_t instead of int
@ 2011-10-31 17:53   ` Ted Ts'o
  0 siblings, 0 replies; 4+ messages in thread
From: Ted Ts'o @ 2011-10-31 17:53 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: open list:JOURNALLING LAYER..., kernel-janitors

On Fri, Aug 26, 2011 at 12:20:37PM +0300, Dan Carpenter wrote:
> This silences some Sparse warnings:
> fs/jbd2/transaction.c:135:69: warning: incorrect type in argument 2 (different base types)
> fs/jbd2/transaction.c:135:69:    expected restricted gfp_t [usertype] flags
> fs/jbd2/transaction.c:135:69:    got int [signed] gfp_mask
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

This has been merged into the ext4 tree (a while ago, actually, but it
looks like I forgot to send an e-mail ack).

					- Ted

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-10-31 17:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-26  9:20 [patch 2/2] jbd2: use gfp_t instead of int Dan Carpenter
2011-08-26  9:20 ` Dan Carpenter
2011-10-31 17:53 ` Ted Ts'o
2011-10-31 17:53   ` Ted Ts'o

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.