All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH 1/2] ocfs2/quota: Initialized status to 0 in ocfs2_dquot_drop_slow.
  2008-11-25  7:13 [Ocfs2-devel] [PATCH 0/2] 2 minor bug fixes for the latest quota support Tao Ma
@ 2008-11-24 23:21 ` Tao Ma
  2008-11-24 23:21 ` [Ocfs2-devel] [PATCH 2/2] ocfs2/quota: minor fix for quota Tao Ma
  1 sibling, 0 replies; 3+ messages in thread
From: Tao Ma @ 2008-11-24 23:21 UTC (permalink / raw)
  To: ocfs2-devel

In ocfs2_dquot_drop_slow, get a build warning that "status" may
be used uninitalized, so initialize it to "0".

Signed-off-by: Tao Ma <tao.ma@oracle.com>
---
 fs/ocfs2/quota_global.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c
index d2a5bfa..e5f3906 100644
--- a/fs/ocfs2/quota_global.c
+++ b/fs/ocfs2/quota_global.c
@@ -873,7 +873,7 @@ out:
 
 static int ocfs2_dquot_drop_slow(struct inode *inode)
 {
-	int status;
+	int status = 0;
 	int cnt;
 	int got_lock[MAXQUOTAS] = {0, 0};
 	handle_t *handle;
@@ -895,7 +895,7 @@ static int ocfs2_dquot_drop_slow(struct inode *inode)
 	if (IS_ERR(handle)) {
 		status = PTR_ERR(handle);
 		mlog_errno(status);
-				goto out;
+		goto out;
 	}
 	dquot_drop(inode);
 	ocfs2_commit_trans(OCFS2_SB(sb), handle);
-- 
1.5.4.GIT

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

* [Ocfs2-devel] [PATCH 2/2] ocfs2/quota: minor fix for quota.
  2008-11-25  7:13 [Ocfs2-devel] [PATCH 0/2] 2 minor bug fixes for the latest quota support Tao Ma
  2008-11-24 23:21 ` [Ocfs2-devel] [PATCH 1/2] ocfs2/quota: Initialized status to 0 in ocfs2_dquot_drop_slow Tao Ma
@ 2008-11-24 23:21 ` Tao Ma
  1 sibling, 0 replies; 3+ messages in thread
From: Tao Ma @ 2008-11-24 23:21 UTC (permalink / raw)
  To: ocfs2-devel

Fix 2 minor things in quota. They are both found by sparse check.
1. an endian bug in ocfs2_local_quota_add_chunk.
2. change olq_alloc_dquot to static.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
---
 fs/ocfs2/quota_local.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ocfs2/quota_local.c b/fs/ocfs2/quota_local.c
index 54e8788..3d6c31f 100644
--- a/fs/ocfs2/quota_local.c
+++ b/fs/ocfs2/quota_local.c
@@ -981,7 +981,7 @@ static struct ocfs2_quota_chunk *ocfs2_local_quota_add_chunk(
 		goto out_trans;
 	}
 	lock_buffer(bh);
-	dchunk->dqc_free = ol_quota_entries_per_block(sb);
+	dchunk->dqc_free = cpu_to_le32(ol_quota_entries_per_block(sb));
 	memset(dchunk->dqc_bitmap, 0,
 	       sb->s_blocksize - sizeof(struct ocfs2_local_disk_chunk) -
 	       OCFS2_QBLK_RESERVED_SPACE);
@@ -1103,7 +1103,7 @@ out:
 	return ERR_PTR(status);
 }
 
-void olq_alloc_dquot(struct buffer_head *bh, void *private)
+static void olq_alloc_dquot(struct buffer_head *bh, void *private)
 {
 	int *offset = private;
 	struct ocfs2_local_disk_chunk *dchunk;
-- 
1.5.4.GIT

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

* [Ocfs2-devel] [PATCH 0/2] 2 minor bug fixes for the latest quota support.
@ 2008-11-25  7:13 Tao Ma
  2008-11-24 23:21 ` [Ocfs2-devel] [PATCH 1/2] ocfs2/quota: Initialized status to 0 in ocfs2_dquot_drop_slow Tao Ma
  2008-11-24 23:21 ` [Ocfs2-devel] [PATCH 2/2] ocfs2/quota: minor fix for quota Tao Ma
  0 siblings, 2 replies; 3+ messages in thread
From: Tao Ma @ 2008-11-25  7:13 UTC (permalink / raw)
  To: ocfs2-devel

Hi Mark,
	these 2 patches are for Jan's latest quota support in ocfs2. They are 
based on your merge_window, so they can be pushed easily.

Regards,
Tao

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

end of thread, other threads:[~2008-11-25  7:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-25  7:13 [Ocfs2-devel] [PATCH 0/2] 2 minor bug fixes for the latest quota support Tao Ma
2008-11-24 23:21 ` [Ocfs2-devel] [PATCH 1/2] ocfs2/quota: Initialized status to 0 in ocfs2_dquot_drop_slow Tao Ma
2008-11-24 23:21 ` [Ocfs2-devel] [PATCH 2/2] ocfs2/quota: minor fix for quota Tao Ma

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.