Re: [PATCH] cifs: Percolate error up to the caller during get/set acls [try #2]

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

 



On Tue, Nov 9, 2010 at 1:35 PM, Jeff Layton <jlayton@xxxxxxxxxx> wrote:
> On Tue,  9 Nov 2010 13:15:07 -0600
> shirishpargaonkar@xxxxxxxxx wrote:
>
>> --- a/fs/cifs/inode.c
>> +++ b/fs/cifs/inode.c
>> @@ -688,10 +688,9 @@ int cifs_get_inode_info(struct inode **pinode,
>>
>>  #ifdef CONFIG_CIFS_EXPERIMENTAL
>>       /* fill in 0777 bits from ACL */
>> -     if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) {
>> -             cFYI(1, "Getting mode bits from ACL");
>> -             cifs_acl_to_fattr(cifs_sb, &fattr, *pinode, full_path, pfid);
>> -     }
>> +     if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL)
>> +             rc = cifs_acl_to_fattr(cifs_sb, &fattr, *pinode, full_path,
>> +                                             pfid);
>
> Do you want to return an error from cifs_get_inode_info when fetching
> the ACL fails? I think you either need to goto cgii_exit if rc != 0, or
> keep ignoring the error code like you do today. If the function is
> going to return an error, then there's no real point in doing the later
> stuff (the iget, etc).
>
>
> --
> Jeff Layton <jlayton@xxxxxxxxxx>
>

Jeff, I thought about that. I think we should handle the error in both
cifs_get_inode_info and mode_to_acl.  Both the functions are in experimental
mode. And mode_to_acl does not log any error on rc, so I removed from
cifs_get_inode_info also although cifs_acl_to_fattr does.
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux