hpfs_setattr error case avoids unlock_kernel ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
  'sparse' pointed out to me the code in fs/hpfs/inode.c:hpfs_setattr
changed by Christoph's patch 1025774ce411f2bd4b059ad7b53f0003569b74fa
'remove inode_setattr', and it does look like the error path 
avoids an unlock_kernel (around like 284 of fs/hpfs/inode.c)

fs/hpfs/inode.c:265:5: warning: context imbalance in 'hpfs_setattr' - different lock contexts for basic block

--------------------------
       error = inode_change_ok(inode, attr);
        if (error)
                goto out_unlock;

        if ((attr->ia_valid & ATTR_SIZE) &&
            attr->ia_size != i_size_read(inode)) {
                error = vmtruncate(inode, attr->ia_size);
                if (error)
************            return error;
        }

        setattr_copy(inode, attr);
        mark_inode_dirty(inode);

        hpfs_write_inode(inode);

 out_unlock:
        unlock_kernel();
        return error;
--------------------------

it looks like that 1st 'return error' needs to change into a goto out_unlock;

Dave

-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\ gro.gilbert @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux