~apparmor-dev/apparmor/2_3

« back to all changes in this revision

Viewing changes to kernel-patches/for-mainline/fsetattr.diff

  • Committer: jrjohansen
  • Date: 2008-04-24 17:31:08 UTC
  • Revision ID: svn-v4:40609528-9d10-0410-9bd8-e926d5471da9:trunk:1241

-  d_path path fix
-  remove use of fgetattr
-  fix named transitions

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
 EXPORT_SYMBOL(notify_change);
147
147
--- a/fs/fuse/dir.c
148
148
+++ b/fs/fuse/dir.c
149
 
@@ -1032,21 +1032,22 @@ static int fuse_dir_fsync(struct file *f
 
149
@@ -1063,21 +1063,22 @@ static int fuse_dir_fsync(struct file *f
150
150
        return file ? fuse_fsync_common(file, de, datasync, 1) : 0;
151
151
 }
152
152
 
172
172
 {
173
173
        unsigned ivalid = iattr->ia_valid;
174
174
 
175
 
@@ -1065,7 +1066,7 @@ static void iattr_to_fattr(struct iattr 
 
175
@@ -1096,7 +1097,7 @@ static void iattr_to_fattr(struct iattr 
176
176
                if (!(ivalid & ATTR_ATIME_SET))
177
177
                        arg->valid |= FATTR_ATIME_NOW;
178
178
        }
181
181
                arg->valid |= FATTR_MTIME;
182
182
                arg->mtime = iattr->ia_mtime.tv_sec;
183
183
                arg->mtimensec = iattr->ia_mtime.tv_nsec;
184
 
@@ -1082,8 +1083,8 @@ static void iattr_to_fattr(struct iattr 
 
184
@@ -1113,8 +1114,8 @@ static void iattr_to_fattr(struct iattr 
185
185
  * vmtruncate() doesn't allow for this case, so do the rlimit checking
186
186
  * and the actual truncation by hand.
187
187
  */
192
192
 {
193
193
        struct inode *inode = entry->d_inode;
194
194
        struct fuse_conn *fc = get_fuse_conn(inode);
195
 
@@ -1121,7 +1122,7 @@ static int fuse_do_setattr(struct dentry
 
195
@@ -1152,7 +1153,7 @@ static int fuse_do_setattr(struct dentry
196
196
 
197
197
        memset(&inarg, 0, sizeof(inarg));
198
198
        memset(&outarg, 0, sizeof(outarg));
201
201
        if (file) {
202
202
                struct fuse_file *ff = file->private_data;
203
203
                inarg.valid |= FATTR_FH;
204
 
@@ -1163,10 +1164,7 @@ static int fuse_do_setattr(struct dentry
 
204
@@ -1194,10 +1195,7 @@ static int fuse_do_setattr(struct dentry
205
205
 
206
206
 static int fuse_setattr(struct dentry *entry, struct iattr *attr)
207
207
 {
215
215
 static int fuse_getattr(struct vfsmount *mnt, struct dentry *entry,
216
216
--- a/fs/fuse/file.c
217
217
+++ b/fs/fuse/file.c
218
 
@@ -894,6 +894,11 @@ static sector_t fuse_bmap(struct address
 
218
@@ -907,6 +907,11 @@ static sector_t fuse_bmap(struct address
219
219
        return err ? 0 : outarg.block;
220
220
 }
221
221
 
227
227
 static const struct file_operations fuse_file_operations = {
228
228
        .llseek         = generic_file_llseek,
229
229
        .read           = do_sync_read,
230
 
@@ -908,6 +913,7 @@ static const struct file_operations fuse
 
230
@@ -920,6 +925,7 @@ static const struct file_operations fuse
 
231
        .fsync          = fuse_fsync,
231
232
        .lock           = fuse_file_lock,
232
233
        .flock          = fuse_file_flock,
233
 
        .fgetattr       = fuse_file_fgetattr,
234
 
+       .fsetattr       = fuse_fsetattr,
 
234
+       .fsetattr       = fuse_fsetattr,
235
235
        .splice_read    = generic_file_splice_read,
236
236
 };
237
237
 
238
 
@@ -922,6 +928,7 @@ static const struct file_operations fuse
 
238
@@ -933,6 +939,7 @@ static const struct file_operations fuse
 
239
        .fsync          = fuse_fsync,
239
240
        .lock           = fuse_file_lock,
240
241
        .flock          = fuse_file_flock,
241
 
        .fgetattr       = fuse_file_fgetattr,
242
 
+       .fsetattr       = fuse_fsetattr,
 
242
+       .fsetattr       = fuse_fsetattr,
243
243
        /* no mmap and splice_read */
244
244
 };
245
245
 
374
374
 };
375
375
 
376
376
 /*
377
 
@@ -1189,6 +1181,7 @@ struct file_operations {
 
377
@@ -1188,6 +1180,7 @@ struct file_operations {
 
378
        ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t, unsigned int);
378
379
        ssize_t (*splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t, unsigned int);
379
380
        int (*setlease)(struct file *, long, struct file_lock **);
380
 
        int (*fgetattr)(struct file *, struct kstat *);
381
381
+       int (*fsetattr)(struct file *, struct iattr *);
382
382
 };
383
383
 
384
384
 struct inode_operations {
385
 
@@ -1695,6 +1688,7 @@ extern int do_remount_sb(struct super_bl
 
385
@@ -1694,6 +1687,7 @@ extern int do_remount_sb(struct super_bl
386
386
 extern sector_t bmap(struct inode *, sector_t);
387
387
 #endif
388
388
 extern int notify_change(struct dentry *, struct vfsmount *, struct iattr *);