diff options
author | Dave Kleikamp <shaggy@austin.ibm.com> | 2006-03-14 18:05:45 -0500 |
---|---|---|
committer | Dave Kleikamp <shaggy@austin.ibm.com> | 2006-03-14 18:05:45 -0500 |
commit | c5111f504d2a9b0d258d7c4752b4093523315989 (patch) | |
tree | 6a52864aff79691689aea21cb0cb928327d5de5b /fs/fcntl.c | |
parent | 69eb66d7da7dba2696281981347698e1693c2340 (diff) | |
parent | a488edc914aa1d766a4e2c982b5ae03d5657ec1b (diff) |
Merge with /home/shaggy/git/linus-clean/
Diffstat (limited to 'fs/fcntl.c')
-rw-r--r-- | fs/fcntl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/fcntl.c b/fs/fcntl.c index 5f96786d1c73..dc4a7007f4e7 100644 --- a/fs/fcntl.c +++ b/fs/fcntl.c | |||
@@ -208,8 +208,11 @@ static int setfl(int fd, struct file * filp, unsigned long arg) | |||
208 | struct inode * inode = filp->f_dentry->d_inode; | 208 | struct inode * inode = filp->f_dentry->d_inode; |
209 | int error = 0; | 209 | int error = 0; |
210 | 210 | ||
211 | /* O_APPEND cannot be cleared if the file is marked as append-only */ | 211 | /* |
212 | if (!(arg & O_APPEND) && IS_APPEND(inode)) | 212 | * O_APPEND cannot be cleared if the file is marked as append-only |
213 | * and the file is open for write. | ||
214 | */ | ||
215 | if (((arg ^ filp->f_flags) & O_APPEND) && IS_APPEND(inode)) | ||
213 | return -EPERM; | 216 | return -EPERM; |
214 | 217 | ||
215 | /* O_NOATIME can only be set by the owner or superuser */ | 218 | /* O_NOATIME can only be set by the owner or superuser */ |