diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-08-08 17:21:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-08 18:57:22 -0400 |
commit | f3fb9e27325c4e1730440820ea8a1e9d9a5af709 (patch) | |
tree | d91bb88e8cd6b76c3154c9f42009d7d5f2bf1019 /fs/reiserfs | |
parent | 17093991af4995c4b93f6d8ac63aab68fcd9e1be (diff) |
fs/reiserfs/xattr.c: fix blank line missing after declarations
Fix checkpatch warning:
WARNING: Missing a blank line after declarations
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/reiserfs')
-rw-r--r-- | fs/reiserfs/xattr.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index 40c13dd914a7..7c36898af402 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c | |||
@@ -84,6 +84,7 @@ static int xattr_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) | |||
84 | static int xattr_unlink(struct inode *dir, struct dentry *dentry) | 84 | static int xattr_unlink(struct inode *dir, struct dentry *dentry) |
85 | { | 85 | { |
86 | int error; | 86 | int error; |
87 | |||
87 | BUG_ON(!mutex_is_locked(&dir->i_mutex)); | 88 | BUG_ON(!mutex_is_locked(&dir->i_mutex)); |
88 | 89 | ||
89 | mutex_lock_nested(&dentry->d_inode->i_mutex, I_MUTEX_CHILD); | 90 | mutex_lock_nested(&dentry->d_inode->i_mutex, I_MUTEX_CHILD); |
@@ -98,6 +99,7 @@ static int xattr_unlink(struct inode *dir, struct dentry *dentry) | |||
98 | static int xattr_rmdir(struct inode *dir, struct dentry *dentry) | 99 | static int xattr_rmdir(struct inode *dir, struct dentry *dentry) |
99 | { | 100 | { |
100 | int error; | 101 | int error; |
102 | |||
101 | BUG_ON(!mutex_is_locked(&dir->i_mutex)); | 103 | BUG_ON(!mutex_is_locked(&dir->i_mutex)); |
102 | 104 | ||
103 | mutex_lock_nested(&dentry->d_inode->i_mutex, I_MUTEX_CHILD); | 105 | mutex_lock_nested(&dentry->d_inode->i_mutex, I_MUTEX_CHILD); |
@@ -117,6 +119,7 @@ static struct dentry *open_xa_root(struct super_block *sb, int flags) | |||
117 | { | 119 | { |
118 | struct dentry *privroot = REISERFS_SB(sb)->priv_root; | 120 | struct dentry *privroot = REISERFS_SB(sb)->priv_root; |
119 | struct dentry *xaroot; | 121 | struct dentry *xaroot; |
122 | |||
120 | if (!privroot->d_inode) | 123 | if (!privroot->d_inode) |
121 | return ERR_PTR(-ENODATA); | 124 | return ERR_PTR(-ENODATA); |
122 | 125 | ||
@@ -127,6 +130,7 @@ static struct dentry *open_xa_root(struct super_block *sb, int flags) | |||
127 | xaroot = ERR_PTR(-ENODATA); | 130 | xaroot = ERR_PTR(-ENODATA); |
128 | else if (!xaroot->d_inode) { | 131 | else if (!xaroot->d_inode) { |
129 | int err = -ENODATA; | 132 | int err = -ENODATA; |
133 | |||
130 | if (xattr_may_create(flags)) | 134 | if (xattr_may_create(flags)) |
131 | err = xattr_mkdir(privroot->d_inode, xaroot, 0700); | 135 | err = xattr_mkdir(privroot->d_inode, xaroot, 0700); |
132 | if (err) { | 136 | if (err) { |
@@ -157,6 +161,7 @@ static struct dentry *open_xa_dir(const struct inode *inode, int flags) | |||
157 | xadir = lookup_one_len(namebuf, xaroot, strlen(namebuf)); | 161 | xadir = lookup_one_len(namebuf, xaroot, strlen(namebuf)); |
158 | if (!IS_ERR(xadir) && !xadir->d_inode) { | 162 | if (!IS_ERR(xadir) && !xadir->d_inode) { |
159 | int err = -ENODATA; | 163 | int err = -ENODATA; |
164 | |||
160 | if (xattr_may_create(flags)) | 165 | if (xattr_may_create(flags)) |
161 | err = xattr_mkdir(xaroot->d_inode, xadir, 0700); | 166 | err = xattr_mkdir(xaroot->d_inode, xadir, 0700); |
162 | if (err) { | 167 | if (err) { |
@@ -188,6 +193,7 @@ fill_with_dentries(void *buf, const char *name, int namelen, loff_t offset, | |||
188 | { | 193 | { |
189 | struct reiserfs_dentry_buf *dbuf = buf; | 194 | struct reiserfs_dentry_buf *dbuf = buf; |
190 | struct dentry *dentry; | 195 | struct dentry *dentry; |
196 | |||
191 | WARN_ON_ONCE(!mutex_is_locked(&dbuf->xadir->d_inode->i_mutex)); | 197 | WARN_ON_ONCE(!mutex_is_locked(&dbuf->xadir->d_inode->i_mutex)); |
192 | 198 | ||
193 | if (dbuf->count == ARRAY_SIZE(dbuf->dentries)) | 199 | if (dbuf->count == ARRAY_SIZE(dbuf->dentries)) |
@@ -218,6 +224,7 @@ static void | |||
218 | cleanup_dentry_buf(struct reiserfs_dentry_buf *buf) | 224 | cleanup_dentry_buf(struct reiserfs_dentry_buf *buf) |
219 | { | 225 | { |
220 | int i; | 226 | int i; |
227 | |||
221 | for (i = 0; i < buf->count; i++) | 228 | for (i = 0; i < buf->count; i++) |
222 | if (buf->dentries[i]) | 229 | if (buf->dentries[i]) |
223 | dput(buf->dentries[i]); | 230 | dput(buf->dentries[i]); |
@@ -283,11 +290,13 @@ static int reiserfs_for_each_xattr(struct inode *inode, | |||
283 | int blocks = JOURNAL_PER_BALANCE_CNT * 2 + 2 + | 290 | int blocks = JOURNAL_PER_BALANCE_CNT * 2 + 2 + |
284 | 4 * REISERFS_QUOTA_TRANS_BLOCKS(inode->i_sb); | 291 | 4 * REISERFS_QUOTA_TRANS_BLOCKS(inode->i_sb); |
285 | struct reiserfs_transaction_handle th; | 292 | struct reiserfs_transaction_handle th; |
293 | |||
286 | reiserfs_write_lock(inode->i_sb); | 294 | reiserfs_write_lock(inode->i_sb); |
287 | err = journal_begin(&th, inode->i_sb, blocks); | 295 | err = journal_begin(&th, inode->i_sb, blocks); |
288 | reiserfs_write_unlock(inode->i_sb); | 296 | reiserfs_write_unlock(inode->i_sb); |
289 | if (!err) { | 297 | if (!err) { |
290 | int jerror; | 298 | int jerror; |
299 | |||
291 | mutex_lock_nested(&dir->d_parent->d_inode->i_mutex, | 300 | mutex_lock_nested(&dir->d_parent->d_inode->i_mutex, |
292 | I_MUTEX_XATTR); | 301 | I_MUTEX_XATTR); |
293 | err = action(dir, data); | 302 | err = action(dir, data); |
@@ -340,6 +349,7 @@ static int chown_one_xattr(struct dentry *dentry, void *data) | |||
340 | int reiserfs_delete_xattrs(struct inode *inode) | 349 | int reiserfs_delete_xattrs(struct inode *inode) |
341 | { | 350 | { |
342 | int err = reiserfs_for_each_xattr(inode, delete_one_xattr, NULL); | 351 | int err = reiserfs_for_each_xattr(inode, delete_one_xattr, NULL); |
352 | |||
343 | if (err) | 353 | if (err) |
344 | reiserfs_warning(inode->i_sb, "jdm-20004", | 354 | reiserfs_warning(inode->i_sb, "jdm-20004", |
345 | "Couldn't delete all xattrs (%d)\n", err); | 355 | "Couldn't delete all xattrs (%d)\n", err); |
@@ -350,6 +360,7 @@ int reiserfs_delete_xattrs(struct inode *inode) | |||
350 | int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs) | 360 | int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs) |
351 | { | 361 | { |
352 | int err = reiserfs_for_each_xattr(inode, chown_one_xattr, attrs); | 362 | int err = reiserfs_for_each_xattr(inode, chown_one_xattr, attrs); |
363 | |||
353 | if (err) | 364 | if (err) |
354 | reiserfs_warning(inode->i_sb, "jdm-20007", | 365 | reiserfs_warning(inode->i_sb, "jdm-20007", |
355 | "Couldn't chown all xattrs (%d)\n", err); | 366 | "Couldn't chown all xattrs (%d)\n", err); |
@@ -439,6 +450,7 @@ int reiserfs_commit_write(struct file *f, struct page *page, | |||
439 | static void update_ctime(struct inode *inode) | 450 | static void update_ctime(struct inode *inode) |
440 | { | 451 | { |
441 | struct timespec now = current_fs_time(inode->i_sb); | 452 | struct timespec now = current_fs_time(inode->i_sb); |
453 | |||
442 | if (inode_unhashed(inode) || !inode->i_nlink || | 454 | if (inode_unhashed(inode) || !inode->i_nlink || |
443 | timespec_equal(&inode->i_ctime, &now)) | 455 | timespec_equal(&inode->i_ctime, &now)) |
444 | return; | 456 | return; |
@@ -514,6 +526,7 @@ reiserfs_xattr_set_handle(struct reiserfs_transaction_handle *th, | |||
514 | size_t chunk; | 526 | size_t chunk; |
515 | size_t skip = 0; | 527 | size_t skip = 0; |
516 | size_t page_offset = (file_pos & (PAGE_CACHE_SIZE - 1)); | 528 | size_t page_offset = (file_pos & (PAGE_CACHE_SIZE - 1)); |
529 | |||
517 | if (buffer_size - buffer_pos > PAGE_CACHE_SIZE) | 530 | if (buffer_size - buffer_pos > PAGE_CACHE_SIZE) |
518 | chunk = PAGE_CACHE_SIZE; | 531 | chunk = PAGE_CACHE_SIZE; |
519 | else | 532 | else |
@@ -530,6 +543,7 @@ reiserfs_xattr_set_handle(struct reiserfs_transaction_handle *th, | |||
530 | 543 | ||
531 | if (file_pos == 0) { | 544 | if (file_pos == 0) { |
532 | struct reiserfs_xattr_header *rxh; | 545 | struct reiserfs_xattr_header *rxh; |
546 | |||
533 | skip = file_pos = sizeof(struct reiserfs_xattr_header); | 547 | skip = file_pos = sizeof(struct reiserfs_xattr_header); |
534 | if (chunk + skip > PAGE_CACHE_SIZE) | 548 | if (chunk + skip > PAGE_CACHE_SIZE) |
535 | chunk = PAGE_CACHE_SIZE - skip; | 549 | chunk = PAGE_CACHE_SIZE - skip; |
@@ -659,6 +673,7 @@ reiserfs_xattr_get(struct inode *inode, const char *name, void *buffer, | |||
659 | size_t chunk; | 673 | size_t chunk; |
660 | char *data; | 674 | char *data; |
661 | size_t skip = 0; | 675 | size_t skip = 0; |
676 | |||
662 | if (isize - file_pos > PAGE_CACHE_SIZE) | 677 | if (isize - file_pos > PAGE_CACHE_SIZE) |
663 | chunk = PAGE_CACHE_SIZE; | 678 | chunk = PAGE_CACHE_SIZE; |
664 | else | 679 | else |
@@ -792,6 +807,7 @@ reiserfs_setxattr(struct dentry *dentry, const char *name, const void *value, | |||
792 | int reiserfs_removexattr(struct dentry *dentry, const char *name) | 807 | int reiserfs_removexattr(struct dentry *dentry, const char *name) |
793 | { | 808 | { |
794 | const struct xattr_handler *handler; | 809 | const struct xattr_handler *handler; |
810 | |||
795 | handler = find_xattr_handler_prefix(dentry->d_sb->s_xattr, name); | 811 | handler = find_xattr_handler_prefix(dentry->d_sb->s_xattr, name); |
796 | 812 | ||
797 | if (!handler || get_inode_sd_version(dentry->d_inode) == STAT_DATA_V1) | 813 | if (!handler || get_inode_sd_version(dentry->d_inode) == STAT_DATA_V1) |
@@ -813,9 +829,11 @@ static int listxattr_filler(void *buf, const char *name, int namelen, | |||
813 | { | 829 | { |
814 | struct listxattr_buf *b = (struct listxattr_buf *)buf; | 830 | struct listxattr_buf *b = (struct listxattr_buf *)buf; |
815 | size_t size; | 831 | size_t size; |
832 | |||
816 | if (name[0] != '.' || | 833 | if (name[0] != '.' || |
817 | (namelen != 1 && (name[1] != '.' || namelen != 2))) { | 834 | (namelen != 1 && (name[1] != '.' || namelen != 2))) { |
818 | const struct xattr_handler *handler; | 835 | const struct xattr_handler *handler; |
836 | |||
819 | handler = find_xattr_handler_prefix(b->dentry->d_sb->s_xattr, | 837 | handler = find_xattr_handler_prefix(b->dentry->d_sb->s_xattr, |
820 | name); | 838 | name); |
821 | if (!handler) /* Unsupported xattr name */ | 839 | if (!handler) /* Unsupported xattr name */ |
@@ -885,6 +903,7 @@ static int create_privroot(struct dentry *dentry) | |||
885 | { | 903 | { |
886 | int err; | 904 | int err; |
887 | struct inode *inode = dentry->d_parent->d_inode; | 905 | struct inode *inode = dentry->d_parent->d_inode; |
906 | |||
888 | WARN_ON_ONCE(!mutex_is_locked(&inode->i_mutex)); | 907 | WARN_ON_ONCE(!mutex_is_locked(&inode->i_mutex)); |
889 | 908 | ||
890 | err = xattr_mkdir(inode, dentry, 0700); | 909 | err = xattr_mkdir(inode, dentry, 0700); |
@@ -1015,6 +1034,7 @@ int reiserfs_xattr_init(struct super_block *s, int mount_flags) | |||
1015 | mutex_lock(&privroot->d_inode->i_mutex); | 1034 | mutex_lock(&privroot->d_inode->i_mutex); |
1016 | if (!REISERFS_SB(s)->xattr_root) { | 1035 | if (!REISERFS_SB(s)->xattr_root) { |
1017 | struct dentry *dentry; | 1036 | struct dentry *dentry; |
1037 | |||
1018 | dentry = lookup_one_len(XAROOT_NAME, privroot, | 1038 | dentry = lookup_one_len(XAROOT_NAME, privroot, |
1019 | strlen(XAROOT_NAME)); | 1039 | strlen(XAROOT_NAME)); |
1020 | if (!IS_ERR(dentry)) | 1040 | if (!IS_ERR(dentry)) |