aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-05-31 11:14:38 -0400
committerArtem Bityutskiy <dedekind1@gmail.com>2011-07-04 03:54:27 -0400
commitd808efb407e1a2cf83a8d21411157195f26bdef9 (patch)
treea939d339288290b10b332dc6890646e68867aa20 /fs/ubifs
parentbb2615d4d14777fd37e2b91bd99b92c0354813d1 (diff)
UBIFS: amend debugging inode size check function prototype
Add 'const struct ubifs_info *c' parameter to 'dbg_check_synced_i_size()' function because we'll need it in the next patch when we switch to debugfs. So this patch is just a preparation. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/debug.c3
-rw-r--r--fs/ubifs/debug.h6
-rw-r--r--fs/ubifs/dir.c4
-rw-r--r--fs/ubifs/file.c2
4 files changed, 9 insertions, 6 deletions
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index 26d4c6173181..7adf9fe91817 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
@@ -1132,6 +1132,7 @@ out:
1132 1132
1133/** 1133/**
1134 * dbg_check_synced_i_size - check synchronized inode size. 1134 * dbg_check_synced_i_size - check synchronized inode size.
1135 * @c: UBIFS file-system description object
1135 * @inode: inode to check 1136 * @inode: inode to check
1136 * 1137 *
1137 * If inode is clean, synchronized inode size has to be equivalent to current 1138 * If inode is clean, synchronized inode size has to be equivalent to current
@@ -1139,7 +1140,7 @@ out:
1139 * has to be locked). Returns %0 if synchronized inode size if correct, and 1140 * has to be locked). Returns %0 if synchronized inode size if correct, and
1140 * %-EINVAL if not. 1141 * %-EINVAL if not.
1141 */ 1142 */
1142int dbg_check_synced_i_size(struct inode *inode) 1143int dbg_check_synced_i_size(const struct ubifs_info *c, struct inode *inode)
1143{ 1144{
1144 int err = 0; 1145 int err = 0;
1145 struct ubifs_inode *ui = ubifs_inode(inode); 1146 struct ubifs_inode *ui = ubifs_inode(inode);
diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h
index a51c20be655d..90805bd49456 100644
--- a/fs/ubifs/debug.h
+++ b/fs/ubifs/debug.h
@@ -247,7 +247,7 @@ int dbg_check_cats(struct ubifs_info *c);
247int dbg_check_ltab(struct ubifs_info *c); 247int dbg_check_ltab(struct ubifs_info *c);
248int dbg_chk_lpt_free_spc(struct ubifs_info *c); 248int dbg_chk_lpt_free_spc(struct ubifs_info *c);
249int dbg_chk_lpt_sz(struct ubifs_info *c, int action, int len); 249int dbg_chk_lpt_sz(struct ubifs_info *c, int action, int len);
250int dbg_check_synced_i_size(struct inode *inode); 250int dbg_check_synced_i_size(const struct ubifs_info *c, struct inode *inode);
251int dbg_check_dir(struct ubifs_info *c, const struct inode *dir); 251int dbg_check_dir(struct ubifs_info *c, const struct inode *dir);
252int dbg_check_tnc(struct ubifs_info *c, int extra); 252int dbg_check_tnc(struct ubifs_info *c, int extra);
253int dbg_check_idx_size(struct ubifs_info *c, long long idx_size); 253int dbg_check_idx_size(struct ubifs_info *c, long long idx_size);
@@ -416,7 +416,9 @@ static inline int dbg_check_ltab(struct ubifs_info *c) { return 0; }
416static inline int dbg_chk_lpt_free_spc(struct ubifs_info *c) { return 0; } 416static inline int dbg_chk_lpt_free_spc(struct ubifs_info *c) { return 0; }
417static inline int dbg_chk_lpt_sz(struct ubifs_info *c, 417static inline int dbg_chk_lpt_sz(struct ubifs_info *c,
418 int action, int len) { return 0; } 418 int action, int len) { return 0; }
419static inline int dbg_check_synced_i_size(struct inode *inode) { return 0; } 419static inline int
420dbg_check_synced_i_size(const struct ubifs_info *c,
421 struct inode *inode) { return 0; }
420static inline int dbg_check_dir(struct ubifs_info *c, 422static inline int dbg_check_dir(struct ubifs_info *c,
421 const struct inode *dir) { return 0; } 423 const struct inode *dir) { return 0; }
422static inline int dbg_check_tnc(struct ubifs_info *c, int extra) { return 0; } 424static inline int dbg_check_tnc(struct ubifs_info *c, int extra) { return 0; }
diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
index d1725a9914ac..98014bf1d8b4 100644
--- a/fs/ubifs/dir.c
+++ b/fs/ubifs/dir.c
@@ -524,7 +524,7 @@ static int ubifs_link(struct dentry *old_dentry, struct inode *dir,
524 ubifs_assert(mutex_is_locked(&dir->i_mutex)); 524 ubifs_assert(mutex_is_locked(&dir->i_mutex));
525 ubifs_assert(mutex_is_locked(&inode->i_mutex)); 525 ubifs_assert(mutex_is_locked(&inode->i_mutex));
526 526
527 err = dbg_check_synced_i_size(inode); 527 err = dbg_check_synced_i_size(c, inode);
528 if (err) 528 if (err)
529 return err; 529 return err;
530 530
@@ -579,7 +579,7 @@ static int ubifs_unlink(struct inode *dir, struct dentry *dentry)
579 inode->i_nlink, dir->i_ino); 579 inode->i_nlink, dir->i_ino);
580 ubifs_assert(mutex_is_locked(&dir->i_mutex)); 580 ubifs_assert(mutex_is_locked(&dir->i_mutex));
581 ubifs_assert(mutex_is_locked(&inode->i_mutex)); 581 ubifs_assert(mutex_is_locked(&inode->i_mutex));
582 err = dbg_check_synced_i_size(inode); 582 err = dbg_check_synced_i_size(c, inode);
583 if (err) 583 if (err)
584 return err; 584 return err;
585 585
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index 5e7fccfc4b29..7cf738a4544d 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -1263,7 +1263,7 @@ int ubifs_setattr(struct dentry *dentry, struct iattr *attr)
1263 if (err) 1263 if (err)
1264 return err; 1264 return err;
1265 1265
1266 err = dbg_check_synced_i_size(inode); 1266 err = dbg_check_synced_i_size(c, inode);
1267 if (err) 1267 if (err)
1268 return err; 1268 return err;
1269 1269