lkml.org 
[lkml]   [2010]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[07/59] ocfs2: do not overwrite error codes in ocfs2_init_acl
    2.6.32-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Tiger Yang <tiger.yang@oracle.com>

    commit 6eda3dd33f8a0ce58ee56a11351758643a698db4 upstream.

    Setting the acl while creating a new inode depends on
    the error codes of posix_acl_create_masq. This patch fix
    a issue of overwriting the error codes of it.

    Reported-by: Pawel Zawora <pzawora@gmail.com>
    Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
    Signed-off-by: Joel Becker <joel.becker@oracle.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    fs/ocfs2/acl.c | 9 +++++++--
    1 file changed, 7 insertions(+), 2 deletions(-)

    --- a/fs/ocfs2/acl.c
    +++ b/fs/ocfs2/acl.c
    @@ -347,7 +347,7 @@ int ocfs2_init_acl(handle_t *handle,
    {
    struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
    struct posix_acl *acl = NULL;
    - int ret = 0;
    + int ret = 0, ret2;
    mode_t mode;

    if (!S_ISLNK(inode->i_mode)) {
    @@ -384,7 +384,12 @@ int ocfs2_init_acl(handle_t *handle,
    mode = inode->i_mode;
    ret = posix_acl_create_masq(clone, &mode);
    if (ret >= 0) {
    - ret = ocfs2_acl_set_mode(inode, di_bh, handle, mode);
    + ret2 = ocfs2_acl_set_mode(inode, di_bh, handle, mode);
    + if (ret2) {
    + mlog_errno(ret2);
    + ret = ret2;
    + goto cleanup;
    + }
    if (ret > 0) {
    ret = ocfs2_set_acl(handle, inode,
    di_bh, ACL_TYPE_ACCESS,



    \
     
     \ /
      Last update: 2010-08-25 01:51    [W:0.021 / U:32.728 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site