diff mbox

[2/2] ocfs2: xattr: remove useless free space checking

Message ID 1371709057-11469-2-git-send-email-junxiao.bi@oracle.com (mailing list archive)
State New, archived
Headers show

Commit Message

Junxiao Bi June 20, 2013, 6:17 a.m. UTC
free space checking will be done in ocfs2_xattr_ibody_init().
So remove here.

Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
---
 fs/ocfs2/xattr.c |    7 -------
 1 file changed, 7 deletions(-)

Comments

jeff.liu June 20, 2013, 9:01 a.m. UTC | #1
On 06/20/2013 02:17 PM, Junxiao Bi wrote:

> free space checking will be done in ocfs2_xattr_ibody_init().
> So remove here.
> 
> Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>

Reviewed-by: Jie Liu <jeff.liu@oracle.com>

> ---
>  fs/ocfs2/xattr.c |    7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
> index 3bb0708..7de1a78 100644
> --- a/fs/ocfs2/xattr.c
> +++ b/fs/ocfs2/xattr.c
> @@ -2759,13 +2759,6 @@ static int ocfs2_xattr_ibody_set(struct inode *inode,
>  
>  	down_write(&oi->ip_alloc_sem);
>  	if (!(oi->ip_dyn_features & OCFS2_INLINE_XATTR_FL)) {
> -		if (!ocfs2_xattr_has_space_inline(inode, di)) {
> -			ret = -ENOSPC;
> -			goto out;
> -		}
> -	}
> -
> -	if (!(oi->ip_dyn_features & OCFS2_INLINE_XATTR_FL)) {
>  		ret = ocfs2_xattr_ibody_init(inode, xs->inode_bh, ctxt);
>  		if (ret) {
>  			if (ret != -ENOSPC)
Joel Becker July 1, 2013, 10:44 p.m. UTC | #2
On Thu, Jun 20, 2013 at 05:01:25PM +0800, Jeff Liu wrote:
> On 06/20/2013 02:17 PM, Junxiao Bi wrote:
> 
> > free space checking will be done in ocfs2_xattr_ibody_init().
> > So remove here.
> > 
> > Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
> 
> Reviewed-by: Jie Liu <jeff.liu@oracle.com>

Acked-by: Joel Becker <jlbec@evilplan.org>

> 
> > ---
> >  fs/ocfs2/xattr.c |    7 -------
> >  1 file changed, 7 deletions(-)
> > 
> > diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
> > index 3bb0708..7de1a78 100644
> > --- a/fs/ocfs2/xattr.c
> > +++ b/fs/ocfs2/xattr.c
> > @@ -2759,13 +2759,6 @@ static int ocfs2_xattr_ibody_set(struct inode *inode,
> >  
> >  	down_write(&oi->ip_alloc_sem);
> >  	if (!(oi->ip_dyn_features & OCFS2_INLINE_XATTR_FL)) {
> > -		if (!ocfs2_xattr_has_space_inline(inode, di)) {
> > -			ret = -ENOSPC;
> > -			goto out;
> > -		}
> > -	}
> > -
> > -	if (!(oi->ip_dyn_features & OCFS2_INLINE_XATTR_FL)) {
> >  		ret = ocfs2_xattr_ibody_init(inode, xs->inode_bh, ctxt);
> >  		if (ret) {
> >  			if (ret != -ENOSPC)
> 
> 
> 
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel@oss.oracle.com
> https://oss.oracle.com/mailman/listinfo/ocfs2-devel
diff mbox

Patch

diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 3bb0708..7de1a78 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -2759,13 +2759,6 @@  static int ocfs2_xattr_ibody_set(struct inode *inode,
 
 	down_write(&oi->ip_alloc_sem);
 	if (!(oi->ip_dyn_features & OCFS2_INLINE_XATTR_FL)) {
-		if (!ocfs2_xattr_has_space_inline(inode, di)) {
-			ret = -ENOSPC;
-			goto out;
-		}
-	}
-
-	if (!(oi->ip_dyn_features & OCFS2_INLINE_XATTR_FL)) {
 		ret = ocfs2_xattr_ibody_init(inode, xs->inode_bh, ctxt);
 		if (ret) {
 			if (ret != -ENOSPC)