diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-08-14 06:19:59 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-08-14 06:19:59 -0400 |
| commit | 8d7ccaa545490cdffdfaff0842436a8dd85cf47b (patch) | |
| tree | 8129b5907161bc6ae26deb3645ce1e280c5e1f51 /fs/attr.c | |
| parent | b2139aa0eec330c711c5a279db361e5ef1178e78 (diff) | |
| parent | 30a2f3c60a84092c8084dfe788b710f8d0768cd4 (diff) | |
Merge commit 'v2.6.27-rc3' into x86/prototypes
Conflicts:
include/asm-x86/dma-mapping.h
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/attr.c')
| -rw-r--r-- | fs/attr.c | 7 |
1 files changed, 6 insertions, 1 deletions
| @@ -51,7 +51,7 @@ int inode_change_ok(struct inode *inode, struct iattr *attr) | |||
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | /* Check for setting the inode time. */ | 53 | /* Check for setting the inode time. */ |
| 54 | if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET)) { | 54 | if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET | ATTR_TIMES_SET)) { |
| 55 | if (!is_owner_or_cap(inode)) | 55 | if (!is_owner_or_cap(inode)) |
| 56 | goto error; | 56 | goto error; |
| 57 | } | 57 | } |
| @@ -108,6 +108,11 @@ int notify_change(struct dentry * dentry, struct iattr * attr) | |||
| 108 | struct timespec now; | 108 | struct timespec now; |
| 109 | unsigned int ia_valid = attr->ia_valid; | 109 | unsigned int ia_valid = attr->ia_valid; |
| 110 | 110 | ||
| 111 | if (ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID | ATTR_TIMES_SET)) { | ||
| 112 | if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) | ||
| 113 | return -EPERM; | ||
| 114 | } | ||
| 115 | |||
| 111 | now = current_fs_time(inode->i_sb); | 116 | now = current_fs_time(inode->i_sb); |
| 112 | 117 | ||
| 113 | attr->ia_ctime = now; | 118 | attr->ia_ctime = now; |
