Merge branch 'xfs-misc-fixes-for-4.4-2' into for-next
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
#include "xfs_symlink.h"
|
||||
#include "xfs_trans.h"
|
||||
#include "xfs_pnfs.h"
|
||||
#include "xfs_acl.h"
|
||||
|
||||
#include <linux/capability.h>
|
||||
#include <linux/dcache.h>
|
||||
@@ -482,6 +483,7 @@ xfs_attrmulti_attr_set(
|
||||
__uint32_t flags)
|
||||
{
|
||||
unsigned char *kbuf;
|
||||
int error;
|
||||
|
||||
if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
|
||||
return -EPERM;
|
||||
@@ -492,7 +494,11 @@ xfs_attrmulti_attr_set(
|
||||
if (IS_ERR(kbuf))
|
||||
return PTR_ERR(kbuf);
|
||||
|
||||
return xfs_attr_set(XFS_I(inode), name, kbuf, len, flags);
|
||||
error = xfs_attr_set(XFS_I(inode), name, kbuf, len, flags);
|
||||
if (!error)
|
||||
xfs_forget_acl(inode, name, flags);
|
||||
kfree(kbuf);
|
||||
return error;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -501,9 +507,14 @@ xfs_attrmulti_attr_remove(
|
||||
unsigned char *name,
|
||||
__uint32_t flags)
|
||||
{
|
||||
int error;
|
||||
|
||||
if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
|
||||
return -EPERM;
|
||||
return xfs_attr_remove(XFS_I(inode), name, flags);
|
||||
error = xfs_attr_remove(XFS_I(inode), name, flags);
|
||||
if (!error)
|
||||
xfs_forget_acl(inode, name, flags);
|
||||
return error;
|
||||
}
|
||||
|
||||
STATIC int
|
||||
|
Reference in New Issue
Block a user