Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1234161 > unrolled thread

[PATCH 00/17] cleanups of fs about new/huge_valid_dev

Started byYaowei Bai <bywxiaobai@163.com>
First post2015-09-28 15:40 +0200
Last post2015-10-01 15:40 +0200
Articles 20 on this page of 31 — 9 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 00/17] cleanups of fs about new/huge_valid_dev Yaowei Bai <bywxiaobai@163.com> - 2015-09-28 15:40 +0200
    [PATCH 04/17] fs/btrfs: remove unnecessary new_valid_dev check Yaowei Bai <bywxiaobai@163.com> - 2015-09-28 15:50 +0200
      Re: [PATCH 04/17] fs/btrfs: remove unnecessary new_valid_dev check David Sterba <dsterba@suse.cz> - 2015-09-29 17:00 +0200
    [PATCH 05/17] fs/exofs: remove unnecessary new_valid_dev check Yaowei Bai <bywxiaobai@163.com> - 2015-09-28 16:00 +0200
      Re: [PATCH 05/17] fs/exofs: remove unnecessary new_valid_dev check Boaz Harrosh <ooo@electrozaur.com> - 2015-09-29 15:50 +0200
        Re: [PATCH 05/17] fs/exofs: remove unnecessary new_valid_dev check Yaowei Bai <bywxiaobai@163.com> - 2015-09-29 17:50 +0200
          Re: [PATCH 05/17] fs/exofs: remove unnecessary new_valid_dev check Boaz Harrosh <ooo@electrozaur.com> - 2015-09-30 12:30 +0200
    [PATCH 08/17] fs/f2fs: remove unnecessary new_valid_dev check Yaowei Bai <bywxiaobai@163.com> - 2015-09-28 16:00 +0200
    [PATCH 07/17] fs/ext4: remove unnecessary new_valid_dev check Yaowei Bai <bywxiaobai@163.com> - 2015-09-28 16:00 +0200
    [PATCH 06/17] fs/ext2: remove unnecessary new_valid_dev check Yaowei Bai <bywxiaobai@163.com> - 2015-09-28 16:00 +0200
    [PATCH 10/17] fs/jffs2: remove unnecessary new_valid_dev check Yaowei Bai <bywxiaobai@163.com> - 2015-09-28 16:20 +0200
      Re: [PATCH 10/17] fs/jffs2: remove unnecessary new_valid_dev check Brian Norris <computersforpeace@gmail.com> - 2015-09-29 01:30 +0200
    [PATCH 11/17] fs/jfs: remove unnecessary new_valid_dev check Yaowei Bai <bywxiaobai@163.com> - 2015-09-28 16:30 +0200
      Re: [Jfs-discussion] [PATCH 11/17] fs/jfs: remove unnecessary  new_valid_dev check Dave Kleikamp <dave.kleikamp@oracle.com> - 2015-09-28 17:50 +0200
    [PATCH 06/17] fs/ext2: remove unnecessary new_valid_dev check Yaowei Bai <bywxiaobai@163.com> - 2015-09-28 16:30 +0200
    [PATCH 09/17] fs/hpfs: remove unnecessary new_valid_dev check Yaowei Bai <bywxiaobai@163.com> - 2015-09-28 16:40 +0200
      Re: [PATCH 09/17] fs/hpfs: remove unnecessary new_valid_dev check Mikulas Patocka <mikulas@twibright.com> - 2015-09-29 17:10 +0200
        Re: [PATCH 09/17] fs/hpfs: remove unnecessary new_valid_dev check Yaowei Bai <bywxiaobai@163.com> - 2015-09-30 13:20 +0200
          Re: [PATCH 09/17] fs/hpfs: remove unnecessary new_valid_dev check Mikulas Patocka <mikulas@twibright.com> - 2015-10-01 23:00 +0200
    [PATCH 12/17] fs/ncpfs: remove unnecessary new_valid_dev check Yaowei Bai <bywxiaobai@163.com> - 2015-09-28 16:40 +0200
    [PATCH 14/17] fs/nilfs2: remove unnecessary new_valid_dev check Yaowei Bai <bywxiaobai@163.com> - 2015-09-28 16:40 +0200
      Re: [PATCH 14/17] fs/nilfs2: remove unnecessary new_valid_dev check Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> - 2015-09-29 17:20 +0200
    [PATCH 13/17] fs/nfs: remove unnecessary new_valid_dev check Yaowei Bai <bywxiaobai@163.com> - 2015-09-28 16:40 +0200
    [PATCH 17/17] fs/ubifs: remove unnecessary new_valid_dev check Yaowei Bai <bywxiaobai@163.com> - 2015-09-28 17:00 +0200
      Re: [PATCH 17/17] fs/ubifs: remove unnecessary new_valid_dev check Richard Weinberger <richard.weinberger@gmail.com> - 2015-09-28 21:30 +0200
        Re: [PATCH 17/17] fs/ubifs: remove unnecessary new_valid_dev check Yaowei Bai <bywxiaobai@163.com> - 2015-09-29 15:50 +0200
    [PATCH 15/17] fs/reiserfs: remove unnecessary new_valid_dev check Yaowei Bai <bywxiaobai@163.com> - 2015-09-28 17:00 +0200
    [PATCH 16/17] fs/stat: remove unnecessary new_valid_dev check Yaowei Bai <bywxiaobai@163.com> - 2015-09-28 17:00 +0200
    [PATCH] fs/ubifs: remove unnecessary new_valid_dev check Yaowei Bai <bywxiaobai@163.com> - 2015-09-29 16:10 +0200
      Re: [PATCH] fs/ubifs: remove unnecessary new_valid_dev check Richard Weinberger <richard.weinberger@gmail.com> - 2015-09-30 10:20 +0200
        Re: [PATCH] fs/ubifs: remove unnecessary new_valid_dev check Artem Bityutskiy <dedekind1@gmail.com> - 2015-10-01 15:40 +0200

Page 1 of 2  [1] 2  Next page →


#1234161 — [PATCH 00/17] cleanups of fs about new/huge_valid_dev

FromYaowei Bai <bywxiaobai@163.com>
Date2015-09-28 15:40 +0200
Subject[PATCH 00/17] cleanups of fs about new/huge_valid_dev
Message-ID<qdGOS-Rc-7@gated-at.bofh.it>
This patchset is mainly doing some cleanups about new/huge_valid_dev
functions, details are below:

 - (patch 1): remove unused huge_valid_dev function
 - (patch 2): make old/new_valid_dev return bool
 - (patch 3-17): remove unneed new_valid_dev check in fs

Yaowei Bai (17):
  fs/kdev_t: remove unused huge_valid_dev function
  fs/kdev_t: old/new_valid_dev can be boolean
  fs/vfs: remove unnecessary new_valid_dev check
  fs/btrfs: remove unnecessary new_valid_dev check
  fs/exofs: remove unnecessary new_valid_dev check
  fs/ext2: remove unnecessary new_valid_dev check
  fs/ext4: remove unnecessary new_valid_dev check
  fs/f2fs: remove unnecessary new_valid_dev check
  fs/hpfs: remove unnecessary new_valid_dev check
  fs/jffs2: remove unnecessary new_valid_dev check
  fs/jfs: remove unnecessary new_valid_dev check
  fs/ncpfs: remove unnecessary new_valid_dev check
  fs/nfs: remove unnecessary new_valid_dev check
  fs/nilfs2: remove unnecessary new_valid_dev check
  fs/reiserfs: remove unnecessary new_valid_dev check
  fs/stat: remove unnecessary new_valid_dev check
  fs/ubifs: remove unnecessary new_valid_dev check

 fs/9p/vfs_inode.c      | 3 ---
 fs/9p/vfs_inode_dotl.c | 3 ---
 fs/btrfs/inode.c       | 3 ---
 fs/exofs/namei.c       | 3 ---
 fs/ext2/namei.c        | 3 ---
 fs/ext4/namei.c        | 3 ---
 fs/f2fs/namei.c        | 3 ---
 fs/hpfs/namei.c        | 2 --
 fs/jffs2/dir.c         | 3 ---
 fs/jfs/namei.c         | 3 ---
 fs/jfs/super.c         | 3 ---
 fs/ncpfs/dir.c         | 2 --
 fs/nfs/dir.c           | 3 ---
 fs/nilfs2/namei.c      | 3 ---
 fs/reiserfs/namei.c    | 3 ---
 fs/stat.c              | 2 --
 fs/ubifs/dir.c         | 3 ---
 fs/ubifs/misc.h        | 9 ++-------
 include/linux/kdev_t.h | 9 ++-------
 19 files changed, 4 insertions(+), 62 deletions(-)

-- 
1.9.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1234166 — [PATCH 04/17] fs/btrfs: remove unnecessary new_valid_dev check

FromYaowei Bai <bywxiaobai@163.com>
Date2015-09-28 15:50 +0200
Subject[PATCH 04/17] fs/btrfs: remove unnecessary new_valid_dev check
Message-ID<qdGYx-12Y-1@gated-at.bofh.it>
In reply to#1234161
As new_valid_dev always returns 1, so !new_valid_dev check is not
needed, remove it.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
---
 fs/btrfs/inode.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 611b66d..0946790 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6268,9 +6268,6 @@ static int btrfs_mknod(struct inode *dir, struct dentry *dentry,
 	u64 objectid;
 	u64 index = 0;
 
-	if (!new_valid_dev(rdev))
-		return -EINVAL;
-
 	/*
 	 * 2 for inode item and ref
 	 * 2 for dir items
-- 
1.9.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1235198 — Re: [PATCH 04/17] fs/btrfs: remove unnecessary new_valid_dev check

FromDavid Sterba <dsterba@suse.cz>
Date2015-09-29 17:00 +0200
SubjectRe: [PATCH 04/17] fs/btrfs: remove unnecessary new_valid_dev check
Message-ID<qe4xQ-1b4-21@gated-at.bofh.it>
In reply to#1234166
On Mon, Sep 28, 2015 at 09:39:00PM +0800, Yaowei Bai wrote:
> As new_valid_dev always returns 1, so !new_valid_dev check is not
> needed, remove it.
> 
> Signed-off-by: Yaowei Bai <bywxiaobai@163.com>

Acked-by: David Sterba <dsterba@suse.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234172 — [PATCH 05/17] fs/exofs: remove unnecessary new_valid_dev check

FromYaowei Bai <bywxiaobai@163.com>
Date2015-09-28 16:00 +0200
Subject[PATCH 05/17] fs/exofs: remove unnecessary new_valid_dev check
Message-ID<qdH8d-1eq-1@gated-at.bofh.it>
In reply to#1234161
As new_valid_dev always returns 1, so !new_valid_dev check is not
needed, remove it.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
---
 fs/exofs/namei.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/exofs/namei.c b/fs/exofs/namei.c
index 09a6bb1..994e078 100644
--- a/fs/exofs/namei.c
+++ b/fs/exofs/namei.c
@@ -80,9 +80,6 @@ static int exofs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
 	struct inode *inode;
 	int err;
 
-	if (!new_valid_dev(rdev))
-		return -EINVAL;
-
 	inode = exofs_new_inode(dir, mode);
 	err = PTR_ERR(inode);
 	if (!IS_ERR(inode)) {
-- 
1.9.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1235080 — Re: [PATCH 05/17] fs/exofs: remove unnecessary new_valid_dev check

FromBoaz Harrosh <ooo@electrozaur.com>
Date2015-09-29 15:50 +0200
SubjectRe: [PATCH 05/17] fs/exofs: remove unnecessary new_valid_dev check
Message-ID<qe3s8-85D-49@gated-at.bofh.it>
In reply to#1234172
On 09/28/2015 04:43 PM, Yaowei Bai wrote:
> As new_valid_dev always returns 1, so !new_valid_dev check is not
> needed, remove it.
> 
> Signed-off-by: Yaowei Bai <bywxiaobai@163.com>

ACK-by: Boaz Harrosh <ooo@electrozaur.com>

Please submit this through some General tree like the vfs or mm-tree

Thanks
Boaz

> ---
>  fs/exofs/namei.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/fs/exofs/namei.c b/fs/exofs/namei.c
> index 09a6bb1..994e078 100644
> --- a/fs/exofs/namei.c
> +++ b/fs/exofs/namei.c
> @@ -80,9 +80,6 @@ static int exofs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
>  	struct inode *inode;
>  	int err;
>  
> -	if (!new_valid_dev(rdev))
> -		return -EINVAL;
> -
>  	inode = exofs_new_inode(dir, mode);
>  	err = PTR_ERR(inode);
>  	if (!IS_ERR(inode)) {
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1235314 — Re: [PATCH 05/17] fs/exofs: remove unnecessary new_valid_dev check

FromYaowei Bai <bywxiaobai@163.com>
Date2015-09-29 17:50 +0200
SubjectRe: [PATCH 05/17] fs/exofs: remove unnecessary new_valid_dev check
Message-ID<qe5kf-2lV-21@gated-at.bofh.it>
In reply to#1235080
On Tue, Sep 29, 2015 at 04:47:30PM +0300, Boaz Harrosh wrote:
> On 09/28/2015 04:43 PM, Yaowei Bai wrote:
> > As new_valid_dev always returns 1, so !new_valid_dev check is not
> > needed, remove it.
> > 
> > Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
> 
> ACK-by: Boaz Harrosh <ooo@electrozaur.com>

Thanks.

> 
> Please submit this through some General tree like the vfs or mm-tree

This's my first fs-specific patch, so i think you mean i should cc vfs
or mm-tree?

> 
> Thanks
> Boaz
> 
> > ---
> >  fs/exofs/namei.c | 3 ---
> >  1 file changed, 3 deletions(-)
> > 
> > diff --git a/fs/exofs/namei.c b/fs/exofs/namei.c
> > index 09a6bb1..994e078 100644
> > --- a/fs/exofs/namei.c
> > +++ b/fs/exofs/namei.c
> > @@ -80,9 +80,6 @@ static int exofs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
> >  	struct inode *inode;
> >  	int err;
> >  
> > -	if (!new_valid_dev(rdev))
> > -		return -EINVAL;
> > -
> >  	inode = exofs_new_inode(dir, mode);
> >  	err = PTR_ERR(inode);
> >  	if (!IS_ERR(inode)) {
> > 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1236072 — Re: [PATCH 05/17] fs/exofs: remove unnecessary new_valid_dev check

FromBoaz Harrosh <ooo@electrozaur.com>
Date2015-09-30 12:30 +0200
SubjectRe: [PATCH 05/17] fs/exofs: remove unnecessary new_valid_dev check
Message-ID<qemO8-2bO-49@gated-at.bofh.it>
In reply to#1235314
On 09/29/2015 06:46 PM, Yaowei Bai wrote:
> On Tue, Sep 29, 2015 at 04:47:30PM +0300, Boaz Harrosh wrote:
>> On 09/28/2015 04:43 PM, Yaowei Bai wrote:
>>> As new_valid_dev always returns 1, so !new_valid_dev check is not
>>> needed, remove it.
>>>
>>> Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
>>
>> ACK-by: Boaz Harrosh <ooo@electrozaur.com>
> 
> Thanks.
> 
>>
>> Please submit this through some General tree like the vfs or mm-tree
> 
> This's my first fs-specific patch, so i think you mean i should cc vfs
> or mm-tree?
> 

Yes you should ask Al (or Morton) to take the all patchset through their
tree. Then once all users of new_valid_dev() are gone it can be removed
in the one tree.

Thanks
Boaz

>>
>> Thanks
>> Boaz
>>
>>> ---
>>>  fs/exofs/namei.c | 3 ---
>>>  1 file changed, 3 deletions(-)
>>>
>>> diff --git a/fs/exofs/namei.c b/fs/exofs/namei.c
>>> index 09a6bb1..994e078 100644
>>> --- a/fs/exofs/namei.c
>>> +++ b/fs/exofs/namei.c
>>> @@ -80,9 +80,6 @@ static int exofs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
>>>  	struct inode *inode;
>>>  	int err;
>>>  
>>> -	if (!new_valid_dev(rdev))
>>> -		return -EINVAL;
>>> -
>>>  	inode = exofs_new_inode(dir, mode);
>>>  	err = PTR_ERR(inode);
>>>  	if (!IS_ERR(inode)) {
>>>
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234178 — [PATCH 08/17] fs/f2fs: remove unnecessary new_valid_dev check

FromYaowei Bai <bywxiaobai@163.com>
Date2015-09-28 16:00 +0200
Subject[PATCH 08/17] fs/f2fs: remove unnecessary new_valid_dev check
Message-ID<qdH8e-1eq-7@gated-at.bofh.it>
In reply to#1234161
As new_valid_dev always returns 1, so !new_valid_dev check is not
needed, remove it.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
---
 fs/f2fs/namei.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index a680bf3..c87ec52 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -478,9 +478,6 @@ static int f2fs_mknod(struct inode *dir, struct dentry *dentry,
 	struct inode *inode;
 	int err = 0;
 
-	if (!new_valid_dev(rdev))
-		return -EINVAL;
-
 	f2fs_balance_fs(sbi);
 
 	inode = f2fs_new_inode(dir, mode);
-- 
1.9.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234180 — [PATCH 07/17] fs/ext4: remove unnecessary new_valid_dev check

FromYaowei Bai <bywxiaobai@163.com>
Date2015-09-28 16:00 +0200
Subject[PATCH 07/17] fs/ext4: remove unnecessary new_valid_dev check
Message-ID<qdH8f-1eq-23@gated-at.bofh.it>
In reply to#1234161
As new_valid_dev always returns 1, so !new_valid_dev check is not
needed, remove it.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
---
 fs/ext4/namei.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 9f61e76..41b6cc8 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -2469,9 +2469,6 @@ static int ext4_mknod(struct inode *dir, struct dentry *dentry,
 	struct inode *inode;
 	int err, credits, retries = 0;
 
-	if (!new_valid_dev(rdev))
-		return -EINVAL;
-
 	err = dquot_initialize(dir);
 	if (err)
 		return err;
-- 
1.9.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234182 — [PATCH 06/17] fs/ext2: remove unnecessary new_valid_dev check

FromYaowei Bai <bywxiaobai@163.com>
Date2015-09-28 16:00 +0200
Subject[PATCH 06/17] fs/ext2: remove unnecessary new_valid_dev check
Message-ID<qdH8f-1eq-31@gated-at.bofh.it>
In reply to#1234161
As new_valid_dev always returns 1, so !new_valid_dev check is not
needed, remove it.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
---
 fs/ext2/namei.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c
index b4841e3..3267a80 100644
--- a/fs/ext2/namei.c
+++ b/fs/ext2/namei.c
@@ -143,9 +143,6 @@ static int ext2_mknod (struct inode * dir, struct dentry *dentry, umode_t mode,
 	struct inode * inode;
 	int err;
 
-	if (!new_valid_dev(rdev))
-		return -EINVAL;
-
 	err = dquot_initialize(dir);
 	if (err)
 		return err;
-- 
1.9.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234188 — [PATCH 10/17] fs/jffs2: remove unnecessary new_valid_dev check

FromYaowei Bai <bywxiaobai@163.com>
Date2015-09-28 16:20 +0200
Subject[PATCH 10/17] fs/jffs2: remove unnecessary new_valid_dev check
Message-ID<qdHrA-1Q9-1@gated-at.bofh.it>
In reply to#1234161
As new_valid_dev always returns 1, so !new_valid_dev check is not
needed, remove it.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
---
 fs/jffs2/dir.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c
index 8118002..d211b8e 100644
--- a/fs/jffs2/dir.c
+++ b/fs/jffs2/dir.c
@@ -621,9 +621,6 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, umode_t mode
 	uint32_t alloclen;
 	int ret;
 
-	if (!new_valid_dev(rdev))
-		return -EINVAL;
-
 	ri = jffs2_alloc_raw_inode();
 	if (!ri)
 		return -ENOMEM;
-- 
1.9.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234568 — Re: [PATCH 10/17] fs/jffs2: remove unnecessary new_valid_dev check

FromBrian Norris <computersforpeace@gmail.com>
Date2015-09-29 01:30 +0200
SubjectRe: [PATCH 10/17] fs/jffs2: remove unnecessary new_valid_dev check
Message-ID<qdQ1Q-5K0-1@gated-at.bofh.it>
In reply to#1234188
On Mon, Sep 28, 2015 at 10:15:38PM +0800, Yaowei Bai wrote:
> As new_valid_dev always returns 1, so !new_valid_dev check is not
> needed, remove it.
> 
> Signed-off-by: Yaowei Bai <bywxiaobai@163.com>

Pushed to l2-mtd.git
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234202 — [PATCH 11/17] fs/jfs: remove unnecessary new_valid_dev check

FromYaowei Bai <bywxiaobai@163.com>
Date2015-09-28 16:30 +0200
Subject[PATCH 11/17] fs/jfs: remove unnecessary new_valid_dev check
Message-ID<qdHBg-21o-15@gated-at.bofh.it>
In reply to#1234161
As new_valid_dev always returns 1, so !new_valid_dev check is not
needed, remove it.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
---
 fs/jfs/namei.c | 3 ---
 fs/jfs/super.c | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c
index 35976bd..9d7551f 100644
--- a/fs/jfs/namei.c
+++ b/fs/jfs/namei.c
@@ -1372,9 +1372,6 @@ static int jfs_mknod(struct inode *dir, struct dentry *dentry,
 	tid_t tid;
 	struct tblock *tblk;
 
-	if (!new_valid_dev(rdev))
-		return -EINVAL;
-
 	jfs_info("jfs_mknod: %pd", dentry);
 
 	rc = dquot_initialize(dir);
diff --git a/fs/jfs/super.c b/fs/jfs/super.c
index 4cd9798..8f9176c 100644
--- a/fs/jfs/super.c
+++ b/fs/jfs/super.c
@@ -496,9 +496,6 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent)
 
 	jfs_info("In jfs_read_super: s_flags=0x%lx", sb->s_flags);
 
-	if (!new_valid_dev(sb->s_bdev->bd_dev))
-		return -EOVERFLOW;
-
 	sbi = kzalloc(sizeof(struct jfs_sb_info), GFP_KERNEL);
 	if (!sbi)
 		return -ENOMEM;
-- 
1.9.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234262 — Re: [Jfs-discussion] [PATCH 11/17] fs/jfs: remove unnecessary new_valid_dev check

FromDave Kleikamp <dave.kleikamp@oracle.com>
Date2015-09-28 17:50 +0200
SubjectRe: [Jfs-discussion] [PATCH 11/17] fs/jfs: remove unnecessary new_valid_dev check
Message-ID<qdIQG-3Jd-15@gated-at.bofh.it>
In reply to#1234202
On 09/28/2015 09:18 AM, Yaowei Bai wrote:
> As new_valid_dev always returns 1, so !new_valid_dev check is not
> needed, remove it.
> 
> Signed-off-by: Yaowei Bai <bywxiaobai@163.com>

Acked-by: Dave Kleikamp <dave.kleikamp@oracle.com>

> ---
>  fs/jfs/namei.c | 3 ---
>  fs/jfs/super.c | 3 ---
>  2 files changed, 6 deletions(-)
> 
> diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c
> index 35976bd..9d7551f 100644
> --- a/fs/jfs/namei.c
> +++ b/fs/jfs/namei.c
> @@ -1372,9 +1372,6 @@ static int jfs_mknod(struct inode *dir, struct dentry *dentry,
>  	tid_t tid;
>  	struct tblock *tblk;
>  
> -	if (!new_valid_dev(rdev))
> -		return -EINVAL;
> -
>  	jfs_info("jfs_mknod: %pd", dentry);
>  
>  	rc = dquot_initialize(dir);
> diff --git a/fs/jfs/super.c b/fs/jfs/super.c
> index 4cd9798..8f9176c 100644
> --- a/fs/jfs/super.c
> +++ b/fs/jfs/super.c
> @@ -496,9 +496,6 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent)
>  
>  	jfs_info("In jfs_read_super: s_flags=0x%lx", sb->s_flags);
>  
> -	if (!new_valid_dev(sb->s_bdev->bd_dev))
> -		return -EOVERFLOW;
> -
>  	sbi = kzalloc(sizeof(struct jfs_sb_info), GFP_KERNEL);
>  	if (!sbi)
>  		return -ENOMEM;
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234206 — [PATCH 06/17] fs/ext2: remove unnecessary new_valid_dev check

FromYaowei Bai <bywxiaobai@163.com>
Date2015-09-28 16:30 +0200
Subject[PATCH 06/17] fs/ext2: remove unnecessary new_valid_dev check
Message-ID<qdHBg-21o-27@gated-at.bofh.it>
In reply to#1234161
As new_valid_dev always returns 1, so !new_valid_dev check is not
needed, remove it.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
---
 fs/ext2/namei.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c
index b4841e3..3267a80 100644
--- a/fs/ext2/namei.c
+++ b/fs/ext2/namei.c
@@ -143,9 +143,6 @@ static int ext2_mknod (struct inode * dir, struct dentry *dentry, umode_t mode,
 	struct inode * inode;
 	int err;
 
-	if (!new_valid_dev(rdev))
-		return -EINVAL;
-
 	err = dquot_initialize(dir);
 	if (err)
 		return err;
-- 
1.9.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234213 — [PATCH 09/17] fs/hpfs: remove unnecessary new_valid_dev check

FromYaowei Bai <bywxiaobai@163.com>
Date2015-09-28 16:40 +0200
Subject[PATCH 09/17] fs/hpfs: remove unnecessary new_valid_dev check
Message-ID<qdHKW-2co-11@gated-at.bofh.it>
In reply to#1234161
As new_valid_dev always returns 1, so !new_valid_dev check is not
needed, remove it.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
---
 fs/hpfs/namei.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c
index 9e92c9c..ae4d5a1 100644
--- a/fs/hpfs/namei.c
+++ b/fs/hpfs/namei.c
@@ -227,8 +227,6 @@ static int hpfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, de
 	int err;
 	if ((err = hpfs_chk_name(name, &len))) return err==-ENOENT ? -EINVAL : err;
 	if (hpfs_sb(dir->i_sb)->sb_eas < 2) return -EPERM;
-	if (!new_valid_dev(rdev))
-		return -EINVAL;
 	hpfs_lock(dir->i_sb);
 	err = -ENOSPC;
 	fnode = hpfs_alloc_fnode(dir->i_sb, hpfs_i(dir)->i_dno, &fno, &bh);
-- 
1.9.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1235207 — Re: [PATCH 09/17] fs/hpfs: remove unnecessary new_valid_dev check

FromMikulas Patocka <mikulas@twibright.com>
Date2015-09-29 17:10 +0200
SubjectRe: [PATCH 09/17] fs/hpfs: remove unnecessary new_valid_dev check
Message-ID<qe4Hw-1BQ-15@gated-at.bofh.it>
In reply to#1234213
Hi

I suppose that you should remove the function new_valid_dev at all.

Mikulas


On Mon, 28 Sep 2015, Yaowei Bai wrote:

> As new_valid_dev always returns 1, so !new_valid_dev check is not
> needed, remove it.
> 
> Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
> ---
>  fs/hpfs/namei.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c
> index 9e92c9c..ae4d5a1 100644
> --- a/fs/hpfs/namei.c
> +++ b/fs/hpfs/namei.c
> @@ -227,8 +227,6 @@ static int hpfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, de
>  	int err;
>  	if ((err = hpfs_chk_name(name, &len))) return err==-ENOENT ? -EINVAL : err;
>  	if (hpfs_sb(dir->i_sb)->sb_eas < 2) return -EPERM;
> -	if (!new_valid_dev(rdev))
> -		return -EINVAL;
>  	hpfs_lock(dir->i_sb);
>  	err = -ENOSPC;
>  	fnode = hpfs_alloc_fnode(dir->i_sb, hpfs_i(dir)->i_dno, &fno, &bh);
> -- 
> 1.9.1
> 
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1236171 — Re: [PATCH 09/17] fs/hpfs: remove unnecessary new_valid_dev check

FromYaowei Bai <bywxiaobai@163.com>
Date2015-09-30 13:20 +0200
SubjectRe: [PATCH 09/17] fs/hpfs: remove unnecessary new_valid_dev check
Message-ID<qenAt-3ml-5@gated-at.bofh.it>
In reply to#1235207
On Tue, Sep 29, 2015 at 05:03:24PM +0200, Mikulas Patocka wrote:
> Hi
> 
> I suppose that you should remove the function new_valid_dev at all.

Yes, i thought about that, but actually there's still a user of
new_valid_dev in fs/stat.c:

	#define valid_dev(x)  choose_32_64(old_valid_dev,new_valid_dev)(x)

so i just left new_valid_dev untouched and removed other users in fs first.

> 
> Mikulas
> 
> 
> On Mon, 28 Sep 2015, Yaowei Bai wrote:
> 
> > As new_valid_dev always returns 1, so !new_valid_dev check is not
> > needed, remove it.
> > 
> > Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
> > ---
> >  fs/hpfs/namei.c | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c
> > index 9e92c9c..ae4d5a1 100644
> > --- a/fs/hpfs/namei.c
> > +++ b/fs/hpfs/namei.c
> > @@ -227,8 +227,6 @@ static int hpfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, de
> >  	int err;
> >  	if ((err = hpfs_chk_name(name, &len))) return err==-ENOENT ? -EINVAL : err;
> >  	if (hpfs_sb(dir->i_sb)->sb_eas < 2) return -EPERM;
> > -	if (!new_valid_dev(rdev))
> > -		return -EINVAL;
> >  	hpfs_lock(dir->i_sb);
> >  	err = -ENOSPC;
> >  	fnode = hpfs_alloc_fnode(dir->i_sb, hpfs_i(dir)->i_dno, &fno, &bh);
> > -- 
> > 1.9.1
> > 
> > 
> > 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1237733 — Re: [PATCH 09/17] fs/hpfs: remove unnecessary new_valid_dev check

FromMikulas Patocka <mikulas@twibright.com>
Date2015-10-01 23:00 +0200
SubjectRe: [PATCH 09/17] fs/hpfs: remove unnecessary new_valid_dev check
Message-ID<qeT7m-7th-37@gated-at.bofh.it>
In reply to#1236171

On Wed, 30 Sep 2015, Yaowei Bai wrote:

> On Tue, Sep 29, 2015 at 05:03:24PM +0200, Mikulas Patocka wrote:
> > Hi
> > 
> > I suppose that you should remove the function new_valid_dev at all.
> 
> Yes, i thought about that, but actually there's still a user of
> new_valid_dev in fs/stat.c:
> 
> 	#define valid_dev(x)  choose_32_64(old_valid_dev,new_valid_dev)(x)
> 
> so i just left new_valid_dev untouched and removed other users in fs first.

So, remove that too - change it to choose_32_64(old_valid_dev(x),true)

If you remove most calls for the function new_valid_dev, the function is 
meaningless and shouldn't be present in the source code.

Mikulas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1234214 — [PATCH 12/17] fs/ncpfs: remove unnecessary new_valid_dev check

FromYaowei Bai <bywxiaobai@163.com>
Date2015-09-28 16:40 +0200
Subject[PATCH 12/17] fs/ncpfs: remove unnecessary new_valid_dev check
Message-ID<qdHKV-2co-9@gated-at.bofh.it>
In reply to#1234161
As new_valid_dev always returns 1, so !new_valid_dev check is not
needed, remove it.

Signed-off-by: Yaowei Bai <bywxiaobai@163.com>
---
 fs/ncpfs/dir.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c
index 93575e9..2d9891a 100644
--- a/fs/ncpfs/dir.c
+++ b/fs/ncpfs/dir.c
@@ -1165,8 +1165,6 @@ out:
 static int ncp_mknod(struct inode * dir, struct dentry *dentry,
 		     umode_t mode, dev_t rdev)
 {
-	if (!new_valid_dev(rdev))
-		return -EINVAL;
 	if (ncp_is_nfs_extras(NCP_SERVER(dir), NCP_FINFO(dir)->volNumber)) {
 		ncp_dbg(1, "mode = 0%ho\n", mode);
 		return ncp_create_new(dir, dentry, mode, rdev, 0);
-- 
1.9.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | linux.kernel


csiph-web