aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/file.c
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2008-02-08 07:20:36 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:22:35 -0500
commit4b11111aba6c80cc2969fd1806d2a869bfc9f357 (patch)
tree57b72a1ca58859dc6a9e47d647f29cebb9bcf7e0 /fs/udf/file.c
parentbd45a420f93d18c91115f3f0568dd6a2555aa15a (diff)
udf: fix coding style
fix coding style errors found by checkpatch: - assignments in if conditions - braces {} around single statement blocks - no spaces after commas - printks without KERN_* - lines longer than 80 characters - spaces between "type *" and variable name before: 192 errors, 561 warnings, 8987 lines checked after: 1 errors, 38 warnings, 9468 lines checked Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Jan Kara <jack@suse.cz> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/udf/file.c')
-rw-r--r--fs/udf/file.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/fs/udf/file.c b/fs/udf/file.c
index 3bd5068877fa..a984a8911167 100644
--- a/fs/udf/file.c
+++ b/fs/udf/file.c
@@ -59,7 +59,8 @@ static int udf_adinicb_readpage(struct file *file, struct page *page)
59 return 0; 59 return 0;
60} 60}
61 61
62static int udf_adinicb_writepage(struct page *page, struct writeback_control *wbc) 62static int udf_adinicb_writepage(struct page *page,
63 struct writeback_control *wbc)
63{ 64{
64 struct inode *inode = page->mapping->host; 65 struct inode *inode = page->mapping->host;
65 char *kaddr; 66 char *kaddr;
@@ -116,7 +117,8 @@ static ssize_t udf_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
116 else 117 else
117 pos = ppos; 118 pos = ppos;
118 119
119 if (inode->i_sb->s_blocksize < (udf_file_entry_alloc_offset(inode) + 120 if (inode->i_sb->s_blocksize <
121 (udf_file_entry_alloc_offset(inode) +
120 pos + count)) { 122 pos + count)) {
121 udf_expand_file_adinicb(inode, pos + count, &err); 123 udf_expand_file_adinicb(inode, pos + count, &err);
122 if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_IN_ICB) { 124 if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_IN_ICB) {
@@ -191,15 +193,19 @@ int udf_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
191 193
192 switch (cmd) { 194 switch (cmd) {
193 case UDF_GETVOLIDENT: 195 case UDF_GETVOLIDENT:
194 return copy_to_user((char __user *)arg, 196 if (copy_to_user((char __user *)arg,
195 UDF_SB(inode->i_sb)->s_volume_ident, 32) ? -EFAULT : 0; 197 UDF_SB(inode->i_sb)->s_volume_ident, 32))
198 return -EFAULT;
199 else
200 return 0;
196 case UDF_RELOCATE_BLOCKS: 201 case UDF_RELOCATE_BLOCKS:
197 if (!capable(CAP_SYS_ADMIN)) 202 if (!capable(CAP_SYS_ADMIN))
198 return -EACCES; 203 return -EACCES;
199 if (get_user(old_block, (long __user *)arg)) 204 if (get_user(old_block, (long __user *)arg))
200 return -EFAULT; 205 return -EFAULT;
201 if ((result = udf_relocate_blocks(inode->i_sb, 206 result = udf_relocate_blocks(inode->i_sb,
202 old_block, &new_block)) == 0) 207 old_block, &new_block);
208 if (result == 0)
203 result = put_user(new_block, (long __user *)arg); 209 result = put_user(new_block, (long __user *)arg);
204 return result; 210 return result;
205 case UDF_GETEASIZE: 211 case UDF_GETEASIZE: