diff options
Diffstat (limited to 'fs/f2fs/xattr.c')
-rw-r--r-- | fs/f2fs/xattr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c index 5072bf9ae0ef..b0fd2f2d0716 100644 --- a/fs/f2fs/xattr.c +++ b/fs/f2fs/xattr.c | |||
@@ -135,7 +135,8 @@ static int f2fs_xattr_advise_get(struct dentry *dentry, const char *name, | |||
135 | if (strcmp(name, "") != 0) | 135 | if (strcmp(name, "") != 0) |
136 | return -EINVAL; | 136 | return -EINVAL; |
137 | 137 | ||
138 | *((char *)buffer) = F2FS_I(inode)->i_advise; | 138 | if (buffer) |
139 | *((char *)buffer) = F2FS_I(inode)->i_advise; | ||
139 | return sizeof(char); | 140 | return sizeof(char); |
140 | } | 141 | } |
141 | 142 | ||
@@ -152,6 +153,7 @@ static int f2fs_xattr_advise_set(struct dentry *dentry, const char *name, | |||
152 | return -EINVAL; | 153 | return -EINVAL; |
153 | 154 | ||
154 | F2FS_I(inode)->i_advise |= *(char *)value; | 155 | F2FS_I(inode)->i_advise |= *(char *)value; |
156 | mark_inode_dirty(inode); | ||
155 | return 0; | 157 | return 0; |
156 | } | 158 | } |
157 | 159 | ||