瀏覽代碼

[GFS2] Style changes in ops_address.c

As per the remainder of Jan Engelhardt's fourth email comments,
remove an cast thats not required. Also tidy up the "limit" code
in stuck_releasepage().

Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Steven Whitehouse 18 年之前
父節點
當前提交
0bd5996a00
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      fs/gfs2/ops_address.c

+ 3 - 2
fs/gfs2/ops_address.c

@@ -517,7 +517,7 @@ static int gfs2_commit_write(struct file *file, struct page *page,
 
 
 		kaddr = kmap_atomic(page, KM_USER0);
 		kaddr = kmap_atomic(page, KM_USER0);
 		memcpy(dibh->b_data + sizeof(struct gfs2_dinode) + from,
 		memcpy(dibh->b_data + sizeof(struct gfs2_dinode) + from,
-		       (char *)kaddr + from, to - from);
+		       kaddr + from, to - from);
 		kunmap_atomic(page, KM_USER0);
 		kunmap_atomic(page, KM_USER0);
 
 
 		SetPageUptodate(page);
 		SetPageUptodate(page);
@@ -704,8 +704,9 @@ static void stuck_releasepage(struct buffer_head *bh)
 	struct gfs2_glock *gl;
 	struct gfs2_glock *gl;
 static unsigned limit = 0;
 static unsigned limit = 0;
 
 
-	if (limit++ > 3)
+	if (limit > 3)
 		return;
 		return;
+	limit++;
 
 
 	fs_warn(sdp, "stuck in gfs2_releasepage() %p\n", inode);
 	fs_warn(sdp, "stuck in gfs2_releasepage() %p\n", inode);
 	fs_warn(sdp, "blkno = %llu, bh->b_count = %d\n",
 	fs_warn(sdp, "blkno = %llu, bh->b_count = %d\n",