Commit de9a55b8 authored by Theodore Ts'o's avatar Theodore Ts'o

ext4: Fix up whitespace issues in fs/ext4/inode.c

This is a pure cleanup patch.
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 0610b6e9
...@@ -780,7 +780,7 @@ static int ext4_alloc_branch(handle_t *handle, struct inode *inode, ...@@ -780,7 +780,7 @@ static int ext4_alloc_branch(handle_t *handle, struct inode *inode,
* the chain to point to the new allocated * the chain to point to the new allocated
* data blocks numbers * data blocks numbers
*/ */
for (i=1; i < num; i++) for (i = 1; i < num; i++)
*(branch[n].p + i) = cpu_to_le32(++current_block); *(branch[n].p + i) = cpu_to_le32(++current_block);
} }
BUFFER_TRACE(bh, "marking uptodate"); BUFFER_TRACE(bh, "marking uptodate");
...@@ -823,7 +823,8 @@ static int ext4_alloc_branch(handle_t *handle, struct inode *inode, ...@@ -823,7 +823,8 @@ static int ext4_alloc_branch(handle_t *handle, struct inode *inode,
* chain to new block and return 0. * chain to new block and return 0.
*/ */
static int ext4_splice_branch(handle_t *handle, struct inode *inode, static int ext4_splice_branch(handle_t *handle, struct inode *inode,
ext4_lblk_t block, Indirect *where, int num, int blks) ext4_lblk_t block, Indirect *where, int num,
int blks)
{ {
int i; int i;
int err = 0; int err = 0;
...@@ -1408,8 +1409,7 @@ static int walk_page_buffers(handle_t *handle, ...@@ -1408,8 +1409,7 @@ static int walk_page_buffers(handle_t *handle,
for (bh = head, block_start = 0; for (bh = head, block_start = 0;
ret == 0 && (bh != head || !block_start); ret == 0 && (bh != head || !block_start);
block_start = block_end, bh = next) block_start = block_end, bh = next) {
{
next = bh->b_this_page; next = bh->b_this_page;
block_end = block_start + blocksize; block_end = block_start + blocksize;
if (block_end <= from || block_start >= to) { if (block_end <= from || block_start >= to) {
...@@ -3722,7 +3722,8 @@ static inline int all_zeroes(__le32 *p, __le32 *q) ...@@ -3722,7 +3722,8 @@ static inline int all_zeroes(__le32 *p, __le32 *q)
* (no partially truncated stuff there). */ * (no partially truncated stuff there). */
static Indirect *ext4_find_shared(struct inode *inode, int depth, static Indirect *ext4_find_shared(struct inode *inode, int depth,
ext4_lblk_t offsets[4], Indirect chain[4], __le32 *top) ext4_lblk_t offsets[4], Indirect chain[4],
__le32 *top)
{ {
Indirect *partial, *p; Indirect *partial, *p;
int k, err; int k, err;
...@@ -3778,8 +3779,10 @@ static Indirect *ext4_find_shared(struct inode *inode, int depth, ...@@ -3778,8 +3779,10 @@ static Indirect *ext4_find_shared(struct inode *inode, int depth,
* than `count' because there can be holes in there. * than `count' because there can be holes in there.
*/ */
static void ext4_clear_blocks(handle_t *handle, struct inode *inode, static void ext4_clear_blocks(handle_t *handle, struct inode *inode,
struct buffer_head *bh, ext4_fsblk_t block_to_free, struct buffer_head *bh,
unsigned long count, __le32 *first, __le32 *last) ext4_fsblk_t block_to_free,
unsigned long count, __le32 *first,
__le32 *last)
{ {
__le32 *p; __le32 *p;
if (try_to_extend_transaction(handle, inode)) { if (try_to_extend_transaction(handle, inode)) {
...@@ -3796,10 +3799,11 @@ static void ext4_clear_blocks(handle_t *handle, struct inode *inode, ...@@ -3796,10 +3799,11 @@ static void ext4_clear_blocks(handle_t *handle, struct inode *inode,
} }
/* /*
* Any buffers which are on the journal will be in memory. We find * Any buffers which are on the journal will be in memory. We
* them on the hash table so jbd2_journal_revoke() will run jbd2_journal_forget() * find them on the hash table so jbd2_journal_revoke() will
* on them. We've already detached each block from the file, so * run jbd2_journal_forget() on them. We've already detached
* bforget() in jbd2_journal_forget() should be safe. * each block from the file, so bforget() in
* jbd2_journal_forget() should be safe.
* *
* AKPM: turn on bforget in jbd2_journal_forget()!!! * AKPM: turn on bforget in jbd2_journal_forget()!!!
*/ */
...@@ -4171,7 +4175,7 @@ void ext4_truncate(struct inode *inode) ...@@ -4171,7 +4175,7 @@ void ext4_truncate(struct inode *inode)
(__le32*)partial->bh->b_data+addr_per_block, (__le32*)partial->bh->b_data+addr_per_block,
(chain+n-1) - partial); (chain+n-1) - partial);
BUFFER_TRACE(partial->bh, "call brelse"); BUFFER_TRACE(partial->bh, "call brelse");
brelse (partial->bh); brelse(partial->bh);
partial--; partial--;
} }
do_indirects: do_indirects:
...@@ -4412,6 +4416,7 @@ void ext4_get_inode_flags(struct ext4_inode_info *ei) ...@@ -4412,6 +4416,7 @@ void ext4_get_inode_flags(struct ext4_inode_info *ei)
if (flags & S_DIRSYNC) if (flags & S_DIRSYNC)
ei->i_flags |= EXT4_DIRSYNC_FL; ei->i_flags |= EXT4_DIRSYNC_FL;
} }
static blkcnt_t ext4_inode_blocks(struct ext4_inode *raw_inode, static blkcnt_t ext4_inode_blocks(struct ext4_inode *raw_inode,
struct ext4_inode_info *ei) struct ext4_inode_info *ei)
{ {
...@@ -4754,7 +4759,8 @@ static int ext4_do_update_inode(handle_t *handle, ...@@ -4754,7 +4759,8 @@ static int ext4_do_update_inode(handle_t *handle,
cpu_to_le32(new_encode_dev(inode->i_rdev)); cpu_to_le32(new_encode_dev(inode->i_rdev));
raw_inode->i_block[2] = 0; raw_inode->i_block[2] = 0;
} }
} else for (block = 0; block < EXT4_N_BLOCKS; block++) } else
for (block = 0; block < EXT4_N_BLOCKS; block++)
raw_inode->i_block[block] = ei->i_data[block]; raw_inode->i_block[block] = ei->i_data[block];
raw_inode->i_disk_version = cpu_to_le32(inode->i_version); raw_inode->i_disk_version = cpu_to_le32(inode->i_version);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment