]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/gfs2/eattr.c
ALSA: hda - Fix call of alc888_coef_init()
[linux-2.6-omap-h63xx.git] / fs / gfs2 / eattr.c
index 76ead1acfcc73aecb877436866919bd7445c86d6..e3f76f451b0a7a6c504b6c3d9cb3c096c77e96c0 100644 (file)
@@ -318,6 +318,8 @@ static int ea_remove_unstuffed(struct gfs2_inode *ip, struct buffer_head *bh,
        int error;
 
        al = gfs2_alloc_get(ip);
+       if (!al)
+               return -ENOMEM;
 
        error = gfs2_quota_hold(ip, NO_QUOTA_CHANGE, NO_QUOTA_CHANGE);
        if (error)
@@ -446,7 +448,7 @@ static int ea_get_unstuffed(struct gfs2_inode *ip, struct gfs2_ea_header *ea,
        unsigned int x;
        int error = 0;
 
-       bh = kcalloc(nptrs, sizeof(struct buffer_head *), GFP_KERNEL);
+       bh = kcalloc(nptrs, sizeof(struct buffer_head *), GFP_NOFS);
        if (!bh)
                return -ENOMEM;
 
@@ -681,15 +683,13 @@ static int ea_alloc_skeleton(struct gfs2_inode *ip, struct gfs2_ea_request *er,
        int error;
 
        al = gfs2_alloc_get(ip);
+       if (!al)
+               return -ENOMEM;
 
-       error = gfs2_quota_lock(ip, NO_QUOTA_CHANGE, NO_QUOTA_CHANGE);
+       error = gfs2_quota_lock_check(ip);
        if (error)
                goto out;
 
-       error = gfs2_quota_check(ip, ip->i_inode.i_uid, ip->i_inode.i_gid);
-       if (error)
-               goto out_gunlock_q;
-
        al->al_requested = blks;
 
        error = gfs2_inplace_reserve(ip);
@@ -1206,7 +1206,7 @@ static int ea_acl_chmod_unstuffed(struct gfs2_inode *ip,
        unsigned int x;
        int error;
 
-       bh = kcalloc(nptrs, sizeof(struct buffer_head *), GFP_KERNEL);
+       bh = kcalloc(nptrs, sizeof(struct buffer_head *), GFP_NOFS);
        if (!bh)
                return -ENOMEM;
 
@@ -1464,6 +1464,8 @@ int gfs2_ea_dealloc(struct gfs2_inode *ip)
        int error;
 
        al = gfs2_alloc_get(ip);
+       if (!al)
+               return -ENOMEM;
 
        error = gfs2_quota_hold(ip, NO_QUOTA_CHANGE, NO_QUOTA_CHANGE);
        if (error)