nilfs2: fix a wrong type conversion in nilfs_ioctl()
PATCH 1/1 nilfs2: fix a wrong type conversion in nilfs_ioctl()
(void * __user *) should be (void __user *)
Signed-off-by Li Hong <[email protected]>
--- fs/nilfs2/ioctl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/nilfs2/ioctl.c +1 -1
@@ -648,7 +648,7 @@ static int nilfs_ioctl_get_info(struct inode *inode, struct file *filp,long nilfs_ioctl (struct file *filp,unsigned int cmd,unsigned long arg) {struct inode *inode = filp->f_dentry->d_inode; -void __user *argp = (void *__user *)arg; +void __user *argp = (void __user *)arg;switch (cmd) {case NILFS_IOCTL_CHANGE_CPMODE :
Signature · 6 lines
1.6.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Ryusuke Konishi
AppliedQuoted 3 lines · Li Hong
(void *
__user*) should be (void__user*)Signed-off-by Li Hong <[email protected]>
Applied. Thank you.
Ryusuke Konishi
Quoted 25 lines
--- fs/nilfs2/ioctl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)fs/nilfs2/ioctl.c +1
-1@@ -648,7 +648,7 @@ static int nilfs_ioctl_get_info(struct inode *inode, struct file *filp,long nilfs_ioctl (struct file *filp,unsigned int cmd,unsigned long arg) {struct inode *inode = filp->f_dentry->d_inode; -void __user *argp = (void *__user *)arg; +void __user *argp = (void __user *)arg;switch (cmd) {case NILFS_IOCTL_CHANGE_CPMODE :Signature · 7 lines
1.6.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/2 nilfs2: Combine nilfs_btree_release_path() and nilfs_btree_free_path()
In reply to Li Hongnilfs_btree_release_path() and nilfs_btree_free_path() are bound into each other tightly. Make them into one procedure to clearify the logic and avoid some misusages.
Signed-off-by Li Hong <[email protected]>
--- fs/nilfs2/btree.c | 22 +++++----------------- 1 files changed, 5 insertions(+), 17 deletions(-)
fs/nilfs2/btree.c +5 -17
@@ -93,18 +93,14 @@ out:return path; } -static inline void nilfs_btree_free_path (struct nilfs_btree_path *path) +static void nilfs_btree_free_path (struct nilfs_btree_path *path) { -kmem_cache_free (nilfs_btree_path_cache, path); -} - -static void nilfs_btree_release_path (struct nilfs_btree_path *path) -{ -int level; +int level =NILFS_BTREE_LEVEL_DATA ; -for (level =NILFS_BTREE_LEVEL_DATA ; level <NILFS_BTREE_LEVEL_MAX ; - level++) +for (; level <NILFS_BTREE_LEVEL_MAX ; level++)brelse (path[level].bp_bh); + +kmem_cache_free (nilfs_btree_path_cache, path); }/*
@@ -573,7 +569,6 @@ static int nilfs_btree_lookup(const struct nilfs_bmap *bmap,if (ptrp !=NULL ) *ptrp = ptr; -nilfs_btree_release_path (path);nilfs_btree_free_path (path);return ret;
@@ -655,7 +650,6 @@ static int nilfs_btree_lookup_contig(const struct nilfs_bmap *bmap, *ptrp = ptr; ret = cnt; out: -nilfs_btree_release_path (path);nilfs_btree_free_path (path);return ret; }
@@ -1139,7 +1133,6 @@ static int nilfs_btree_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr)nilfs_bmap_add_blocks (bmap, stats.bs_nblocks); out: -nilfs_btree_release_path (path);nilfs_btree_free_path (path);return ret; }
@@ -1472,7 +1465,6 @@ static int nilfs_btree_delete(struct nilfs_bmap *bmap, __u64 key)nilfs_bmap_sub_blocks (bmap, stats.bs_nblocks); out: -nilfs_btree_release_path (path);nilfs_btree_free_path (path);return ret; }
@@ -1490,7 +1482,6 @@ static int nilfs_btree_last_key(const struct nilfs_bmap *bmap, __u64 *keyp) ret =nilfs_btree_do_lookup_last (btree, path, keyp,NULL ); -nilfs_btree_release_path (path);nilfs_btree_free_path (path);return ret;
@@ -1944,7 +1935,6 @@ static int nilfs_btree_propagate(const struct nilfs_bmap *bmap,nilfs_btree_propagate_p (btree, path, level, bh); out: -nilfs_btree_release_path (path);nilfs_btree_free_path (path);return ret;
@@ -2126,7 +2116,6 @@ static int nilfs_btree_assign(struct nilfs_bmap *bmap,nilfs_btree_assign_p (btree, path, level, bh, blocknr, binfo); out: -nilfs_btree_release_path (path);nilfs_btree_free_path (path);return ret;
@@ -2190,7 +2179,6 @@ static int nilfs_btree_mark(struct nilfs_bmap *bmap, __u64 key, int level)nilfs_bmap_set_dirty (&btree->bt_bmap); out: -nilfs_btree_release_path (path);nilfs_btree_free_path (path);return ret; }
Signature · 6 lines
1.6.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html