* [PATCH] xfs: mute some sparse warnings
@ 2016-03-25 18:04 Eryu Guan
2016-03-25 18:07 ` Christoph Hellwig
2016-03-27 4:28 ` [PATCH v2] " Eryu Guan
0 siblings, 2 replies; 3+ messages in thread
From: Eryu Guan @ 2016-03-25 18:04 UTC (permalink / raw)
To: xfs; +Cc: Eryu Guan
These three warnings are fixed:
fs/xfs/xfs_inode.c:1033:44: warning: Using plain integer as NULL pointer
fs/xfs/xfs_inode_item.c:525:20: warning: context imbalance in 'xfs_inode_item_push' - unexpected unlock
fs/xfs/xfs_dquot.c:696:1: warning: symbol 'xfs_dq_get_next_id' was not declared. Should it be static?
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
---
fs/xfs/xfs_dquot.c | 2 +-
fs/xfs/xfs_inode.c | 2 +-
fs/xfs/xfs_inode_item.c | 3 ++-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
index 316b2a1..8f51370 100644
--- a/fs/xfs/xfs_dquot.c
+++ b/fs/xfs/xfs_dquot.c
@@ -692,7 +692,7 @@ error0:
* end of the chunk, skip ahead to first id in next allocated chunk
* using the SEEK_DATA interface.
*/
-int
+static int
xfs_dq_get_next_id(
xfs_mount_t *mp,
uint type,
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 96f606d..1445a99 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1030,7 +1030,7 @@ xfs_dir_ialloc(
tp->t_flags &= ~(XFS_TRANS_DQ_DIRTY);
}
- code = xfs_trans_roll(&tp, 0);
+ code = xfs_trans_roll(&tp, NULL);
if (committed != NULL)
*committed = 1;
diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c
index c48b5b1..e91c1e6 100644
--- a/fs/xfs/xfs_inode_item.c
+++ b/fs/xfs/xfs_inode_item.c
@@ -478,7 +478,8 @@ xfs_inode_item_unpin(
STATIC uint
xfs_inode_item_push(
struct xfs_log_item *lip,
- struct list_head *buffer_list)
+ struct list_head *buffer_list) __releases(&lip->li_ailp->xa_lock)
+ __acquires(&lip->li_ailp->xa_lock)
{
struct xfs_inode_log_item *iip = INODE_ITEM(lip);
struct xfs_inode *ip = iip->ili_inode;
--
2.5.5
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] xfs: mute some sparse warnings
2016-03-25 18:04 [PATCH] xfs: mute some sparse warnings Eryu Guan
@ 2016-03-25 18:07 ` Christoph Hellwig
2016-03-27 4:28 ` [PATCH v2] " Eryu Guan
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2016-03-25 18:07 UTC (permalink / raw)
To: Eryu Guan; +Cc: xfs
> @@ -478,7 +478,8 @@ xfs_inode_item_unpin(
> STATIC uint
> xfs_inode_item_push(
> struct xfs_log_item *lip,
> - struct list_head *buffer_list)
> + struct list_head *buffer_list) __releases(&lip->li_ailp->xa_lock)
> + __acquires(&lip->li_ailp->xa_lock)
Can you move these down a bit? Something like:
struct list_head *buffer_list)
__releases(&lip->li_ailp->xa_lock)
__acquires(&lip->li_ailp->xa_lock)
{
?
Otherwise looks fine,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH v2] xfs: mute some sparse warnings
2016-03-25 18:04 [PATCH] xfs: mute some sparse warnings Eryu Guan
2016-03-25 18:07 ` Christoph Hellwig
@ 2016-03-27 4:28 ` Eryu Guan
1 sibling, 0 replies; 3+ messages in thread
From: Eryu Guan @ 2016-03-27 4:28 UTC (permalink / raw)
To: xfs; +Cc: Eryu Guan
These three warnings are fixed:
fs/xfs/xfs_inode.c:1033:44: warning: Using plain integer as NULL pointer
fs/xfs/xfs_inode_item.c:525:20: warning: context imbalance in 'xfs_inode_item_push' - unexpected unlock
fs/xfs/xfs_dquot.c:696:1: warning: symbol 'xfs_dq_get_next_id' was not declared. Should it be static?
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
---
v2:
- fix lock annotation format
fs/xfs/xfs_dquot.c | 2 +-
fs/xfs/xfs_inode.c | 2 +-
fs/xfs/xfs_inode_item.c | 2 ++
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
index 316b2a1..8f51370 100644
--- a/fs/xfs/xfs_dquot.c
+++ b/fs/xfs/xfs_dquot.c
@@ -692,7 +692,7 @@ error0:
* end of the chunk, skip ahead to first id in next allocated chunk
* using the SEEK_DATA interface.
*/
-int
+static int
xfs_dq_get_next_id(
xfs_mount_t *mp,
uint type,
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 96f606d..1445a99 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1030,7 +1030,7 @@ xfs_dir_ialloc(
tp->t_flags &= ~(XFS_TRANS_DQ_DIRTY);
}
- code = xfs_trans_roll(&tp, 0);
+ code = xfs_trans_roll(&tp, NULL);
if (committed != NULL)
*committed = 1;
diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c
index c48b5b1..d02cbab 100644
--- a/fs/xfs/xfs_inode_item.c
+++ b/fs/xfs/xfs_inode_item.c
@@ -479,6 +479,8 @@ STATIC uint
xfs_inode_item_push(
struct xfs_log_item *lip,
struct list_head *buffer_list)
+ __releases(&lip->li_ailp->xa_lock)
+ __acquires(&lip->li_ailp->xa_lock)
{
struct xfs_inode_log_item *iip = INODE_ITEM(lip);
struct xfs_inode *ip = iip->ili_inode;
--
2.5.5
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-27 4:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-25 18:04 [PATCH] xfs: mute some sparse warnings Eryu Guan
2016-03-25 18:07 ` Christoph Hellwig
2016-03-27 4:28 ` [PATCH v2] " Eryu Guan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox