1
Index: linux-2.6/fs/9p/vfs_inode.c
2
===================================================================
3
--- linux-2.6.orig/fs/9p/vfs_inode.c
4
+++ linux-2.6/fs/9p/vfs_inode.c
5
@@ -824,16 +824,15 @@ Release_lock:
8
* v9fs_vfs_getattr - retrieve file metadata
9
- * @mnt - mount information
10
- * @dentry - file to get attributes on
11
+ * @path - file to get attributes on
12
* @stat - metadata structure to populate
17
-v9fs_vfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
19
+v9fs_vfs_getattr(struct path *path, struct kstat *stat)
21
+ struct dentry *dentry = path->dentry;
22
struct v9fs_fcall *fcall = NULL;
23
struct v9fs_session_info *v9ses = v9fs_inode2v9ses(dentry->d_inode);
24
struct v9fs_fid *fid = v9fs_fid_clone(dentry);
25
Index: linux-2.6/fs/afs/inode.c
26
===================================================================
27
--- linux-2.6.orig/fs/afs/inode.c
28
+++ linux-2.6/fs/afs/inode.c
29
@@ -218,15 +218,13 @@ inline int afs_iget(struct super_block *
31
* read the attributes of an inode
33
-int afs_inode_getattr(struct vfsmount *mnt, struct dentry *dentry,
35
+int afs_inode_getattr(struct path *path, struct kstat *stat)
37
+ struct dentry *dentry = path->dentry;
38
+ struct inode *inode = dentry->d_inode;
39
struct afs_vnode *vnode;
40
- struct inode *inode;
43
- inode = dentry->d_inode;
45
_enter("{ ino=%lu v=%lu }", inode->i_ino, inode->i_version);
47
vnode = AFS_FS_I(inode);
48
Index: linux-2.6/fs/afs/internal.h
49
===================================================================
50
--- linux-2.6.orig/fs/afs/internal.h
51
+++ linux-2.6/fs/afs/internal.h
52
@@ -82,8 +82,7 @@ extern int afs_cache_get_page_cookie(str
54
extern int afs_iget(struct super_block *sb, struct afs_fid *fid,
55
struct inode **_inode);
56
-extern int afs_inode_getattr(struct vfsmount *mnt, struct dentry *dentry,
57
- struct kstat *stat);
58
+extern int afs_inode_getattr(struct path *path, struct kstat *stat);
59
extern void afs_clear_inode(struct inode *inode);
62
Index: linux-2.6/fs/bad_inode.c
63
===================================================================
64
--- linux-2.6.orig/fs/bad_inode.c
65
+++ linux-2.6/fs/bad_inode.c
66
@@ -257,8 +257,7 @@ static int bad_inode_permission(struct i
70
-static int bad_inode_getattr(struct vfsmount *mnt, struct dentry *dentry,
72
+static int bad_inode_getattr(struct path *path, struct kstat *stat)
76
Index: linux-2.6/fs/cifs/cifsfs.h
77
===================================================================
78
--- linux-2.6.orig/fs/cifs/cifsfs.h
79
+++ linux-2.6/fs/cifs/cifsfs.h
80
@@ -55,7 +55,7 @@ extern int cifs_rmdir(struct inode *, st
81
extern int cifs_rename(struct inode *, struct dentry *, struct inode *,
83
extern int cifs_revalidate(struct dentry *);
84
-extern int cifs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
85
+extern int cifs_getattr(struct path *, struct kstat *);
86
extern int cifs_setattr(struct dentry *, struct iattr *);
88
extern struct inode_operations cifs_file_inode_ops;
89
Index: linux-2.6/fs/cifs/inode.c
90
===================================================================
91
--- linux-2.6.orig/fs/cifs/inode.c
92
+++ linux-2.6/fs/cifs/inode.c
93
@@ -1091,9 +1091,9 @@ int cifs_revalidate(struct dentry *diren
97
-int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry,
99
+int cifs_getattr(struct path *path, struct kstat *stat)
101
+ struct dentry *dentry = path->dentry;
102
int err = cifs_revalidate(dentry);
104
generic_fillattr(dentry->d_inode, stat);
105
Index: linux-2.6/fs/coda/inode.c
106
===================================================================
107
--- linux-2.6.orig/fs/coda/inode.c
108
+++ linux-2.6/fs/coda/inode.c
109
@@ -236,8 +236,9 @@ static void coda_clear_inode(struct inod
110
coda_cache_clear_inode(inode);
113
-int coda_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
114
+int coda_getattr(struct path *path, struct kstat *stat)
116
+ struct dentry *dentry = path->dentry;
117
int err = coda_revalidate_inode(dentry);
119
generic_fillattr(dentry->d_inode, stat);
120
Index: linux-2.6/fs/fat/file.c
121
===================================================================
122
--- linux-2.6.orig/fs/fat/file.c
123
+++ linux-2.6/fs/fat/file.c
124
@@ -303,8 +303,9 @@ void fat_truncate(struct inode *inode)
125
fat_flush_inodes(inode->i_sb, inode, NULL);
128
-int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
129
+int fat_getattr(struct path *path, struct kstat *stat)
131
+ struct dentry *dentry = path->dentry;
132
struct inode *inode = dentry->d_inode;
133
generic_fillattr(inode, stat);
134
stat->blksize = MSDOS_SB(inode->i_sb)->cluster_size;
135
Index: linux-2.6/fs/fuse/dir.c
136
===================================================================
137
--- linux-2.6.orig/fs/fuse/dir.c
138
+++ linux-2.6/fs/fuse/dir.c
139
@@ -1067,11 +1067,11 @@ static int fuse_setattr(struct dentry *e
143
-static int fuse_getattr(struct vfsmount *mnt, struct dentry *entry,
144
- struct kstat *stat)
145
+static int fuse_getattr(struct path *path, struct kstat *stat)
147
- struct inode *inode = entry->d_inode;
148
- int err = fuse_revalidate(entry);
149
+ struct dentry *dentry = path->dentry;
150
+ struct inode *inode = dentry->d_inode;
151
+ int err = fuse_revalidate(dentry);
153
generic_fillattr(inode, stat);
155
Index: linux-2.6/fs/gfs2/ops_inode.c
156
===================================================================
157
--- linux-2.6.orig/fs/gfs2/ops_inode.c
158
+++ linux-2.6/fs/gfs2/ops_inode.c
159
@@ -1001,9 +1001,9 @@ out:
163
-static int gfs2_getattr(struct vfsmount *mnt, struct dentry *dentry,
164
- struct kstat *stat)
165
+static int gfs2_getattr(struct path *path, struct kstat *stat)
167
+ struct dentry *dentry = path->dentry;
168
struct inode *inode = dentry->d_inode;
169
struct gfs2_inode *ip = GFS2_I(inode);
170
struct gfs2_holder gh;
171
Index: linux-2.6/fs/hostfs/hostfs_kern.c
172
===================================================================
173
--- linux-2.6.orig/fs/hostfs/hostfs_kern.c
174
+++ linux-2.6/fs/hostfs/hostfs_kern.c
175
@@ -873,10 +873,9 @@ int hostfs_setattr(struct dentry *dentry
176
return(inode_setattr(dentry->d_inode, attr));
179
-int hostfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
180
- struct kstat *stat)
181
+int hostfs_getattr(struct path *path, struct kstat *stat)
183
- generic_fillattr(dentry->d_inode, stat);
184
+ generic_fillattr(path->dentry->d_inode, stat);
188
Index: linux-2.6/fs/libfs.c
189
===================================================================
190
--- linux-2.6.orig/fs/libfs.c
191
+++ linux-2.6/fs/libfs.c
194
#include <asm/uaccess.h>
196
-int simple_getattr(struct vfsmount *mnt, struct dentry *dentry,
197
- struct kstat *stat)
198
+int simple_getattr(struct path *path, struct kstat *stat)
200
- struct inode *inode = dentry->d_inode;
201
+ struct inode *inode = path->dentry->d_inode;
202
generic_fillattr(inode, stat);
203
stat->blocks = inode->i_mapping->nrpages << (PAGE_CACHE_SHIFT - 9);
205
Index: linux-2.6/fs/minix/inode.c
206
===================================================================
207
--- linux-2.6.orig/fs/minix/inode.c
208
+++ linux-2.6/fs/minix/inode.c
209
@@ -535,8 +535,9 @@ int minix_sync_inode(struct inode * inod
213
-int minix_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
214
+int minix_getattr(struct path *path, struct kstat *stat)
216
+ struct dentry *dentry = path->dentry;
217
generic_fillattr(dentry->d_inode, stat);
218
if (INODE_VERSION(dentry->d_inode) == MINIX_V1)
219
stat->blocks = (BLOCK_SIZE / 512) * V1_minix_blocks(stat->size);
220
Index: linux-2.6/fs/minix/minix.h
221
===================================================================
222
--- linux-2.6.orig/fs/minix/minix.h
223
+++ linux-2.6/fs/minix/minix.h
224
@@ -55,7 +55,7 @@ extern int minix_new_block(struct inode
225
extern void minix_free_block(struct inode * inode, int block);
226
extern unsigned long minix_count_free_blocks(struct minix_sb_info *sbi);
228
-extern int minix_getattr(struct vfsmount *, struct dentry *, struct kstat *);
229
+extern int minix_getattr(struct path *, struct kstat *);
231
extern void V2_minix_truncate(struct inode *);
232
extern void V1_minix_truncate(struct inode *);
233
Index: linux-2.6/fs/nfs/inode.c
234
===================================================================
235
--- linux-2.6.orig/fs/nfs/inode.c
236
+++ linux-2.6/fs/nfs/inode.c
237
@@ -415,9 +415,9 @@ static void nfs_wake_up_inode(struct ino
238
wake_up_bit(&nfsi->flags, NFS_INO_REVALIDATING);
241
-int nfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
242
+int nfs_getattr(struct path *path, struct kstat *stat)
244
- struct inode *inode = dentry->d_inode;
245
+ struct inode *inode = path->dentry->d_inode;
246
int need_atime = NFS_I(inode)->cache_validity & NFS_INO_INVALID_ATIME;
249
@@ -433,8 +433,8 @@ int nfs_getattr(struct vfsmount *mnt, st
250
* - NFS never sets MS_NOATIME or MS_NODIRATIME so there is
251
* no point in checking those.
253
- if ((mnt->mnt_flags & MNT_NOATIME) ||
254
- ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode)))
255
+ if ((path->mnt->mnt_flags & MNT_NOATIME) ||
256
+ ((path->mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode)))
260
Index: linux-2.6/fs/ocfs2/file.c
261
===================================================================
262
--- linux-2.6.orig/fs/ocfs2/file.c
263
+++ linux-2.6/fs/ocfs2/file.c
264
@@ -935,10 +935,9 @@ bail:
268
-int ocfs2_getattr(struct vfsmount *mnt,
269
- struct dentry *dentry,
270
- struct kstat *stat)
271
+int ocfs2_getattr(struct path *path, struct kstat *stat)
273
+ struct dentry *dentry = path->dentry;
274
struct inode *inode = dentry->d_inode;
275
struct super_block *sb = dentry->d_inode->i_sb;
276
struct ocfs2_super *osb = sb->s_fs_info;
277
Index: linux-2.6/fs/ocfs2/file.h
278
===================================================================
279
--- linux-2.6.orig/fs/ocfs2/file.h
280
+++ linux-2.6/fs/ocfs2/file.h
281
@@ -46,8 +46,7 @@ int ocfs2_do_extend_allocation(struct oc
282
struct ocfs2_alloc_context *meta_ac,
283
enum ocfs2_alloc_restarted *reason);
284
int ocfs2_setattr(struct dentry *dentry, struct iattr *attr);
285
-int ocfs2_getattr(struct vfsmount *mnt, struct dentry *dentry,
286
- struct kstat *stat);
287
+int ocfs2_getattr(struct path *path, struct kstat *stat);
288
int ocfs2_permission(struct inode *inode, int mask,
289
struct nameidata *nd);
291
Index: linux-2.6/fs/proc/base.c
292
===================================================================
293
--- linux-2.6.orig/fs/proc/base.c
294
+++ linux-2.6/fs/proc/base.c
295
@@ -1045,9 +1045,9 @@ out_unlock:
299
-static int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
300
+static int pid_getattr(struct path *path, struct kstat *stat)
302
- struct inode *inode = dentry->d_inode;
303
+ struct inode *inode = path->dentry->d_inode;
304
struct task_struct *task;
305
generic_fillattr(inode, stat);
307
@@ -2379,9 +2379,9 @@ out_no_task:
311
-static int proc_task_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
312
+static int proc_task_getattr(struct path *path, struct kstat *stat)
314
- struct inode *inode = dentry->d_inode;
315
+ struct inode *inode = path->dentry->d_inode;
316
struct task_struct *p = get_proc_task(inode);
317
generic_fillattr(inode, stat);
319
Index: linux-2.6/fs/proc/generic.c
320
===================================================================
321
--- linux-2.6.orig/fs/proc/generic.c
322
+++ linux-2.6/fs/proc/generic.c
323
@@ -253,10 +253,9 @@ out:
327
-static int proc_getattr(struct vfsmount *mnt, struct dentry *dentry,
328
- struct kstat *stat)
329
+static int proc_getattr(struct path *path, struct kstat *stat)
331
- struct inode *inode = dentry->d_inode;
332
+ struct inode *inode = path->dentry->d_inode;
333
struct proc_dir_entry *de = PROC_I(inode)->pde;
335
inode->i_nlink = de->nlink;
336
Index: linux-2.6/fs/proc/root.c
337
===================================================================
338
--- linux-2.6.orig/fs/proc/root.c
339
+++ linux-2.6/fs/proc/root.c
340
@@ -92,10 +92,9 @@ void __init proc_root_init(void)
341
proc_bus = proc_mkdir("bus", NULL);
344
-static int proc_root_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat
346
+static int proc_root_getattr(struct path *path, struct kstat *stat)
348
- generic_fillattr(dentry->d_inode, stat);
349
+ generic_fillattr(path->dentry->d_inode, stat);
350
stat->nlink = proc_root.nlink + nr_processes();
353
Index: linux-2.6/fs/smbfs/inode.c
354
===================================================================
355
--- linux-2.6.orig/fs/smbfs/inode.c
356
+++ linux-2.6/fs/smbfs/inode.c
357
@@ -653,8 +653,9 @@ smb_statfs(struct dentry *dentry, struct
361
-int smb_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
362
+int smb_getattr(struct path *path, struct kstat *stat)
364
+ struct dentry *dentry = path->dentry;
365
int err = smb_revalidate_inode(dentry);
367
generic_fillattr(dentry->d_inode, stat);
368
Index: linux-2.6/fs/smbfs/proto.h
369
===================================================================
370
--- linux-2.6.orig/fs/smbfs/proto.h
371
+++ linux-2.6/fs/smbfs/proto.h
372
@@ -60,7 +60,7 @@ extern void smb_get_inode_attr(struct in
373
extern void smb_set_inode_attr(struct inode *inode, struct smb_fattr *fattr);
374
extern void smb_invalidate_inodes(struct smb_sb_info *server);
375
extern int smb_revalidate_inode(struct dentry *dentry);
376
-extern int smb_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat);
377
+extern int smb_getattr(struct path *path, struct kstat *stat);
378
extern int smb_notify_change(struct dentry *dentry, struct iattr *attr);
380
extern const struct address_space_operations smb_file_aops;
381
Index: linux-2.6/fs/stat.c
382
===================================================================
383
--- linux-2.6.orig/fs/stat.c
384
+++ linux-2.6/fs/stat.c
385
@@ -48,7 +48,7 @@ int vfs_getattr(struct path *path, struc
388
if (inode->i_op->getattr)
389
- return inode->i_op->getattr(path->mnt, path->dentry, stat);
390
+ return inode->i_op->getattr(path, stat);
392
generic_fillattr(inode, stat);
394
Index: linux-2.6/fs/sysv/itree.c
395
===================================================================
396
--- linux-2.6.orig/fs/sysv/itree.c
397
+++ linux-2.6/fs/sysv/itree.c
398
@@ -440,10 +440,10 @@ static unsigned sysv_nblocks(struct supe
402
-int sysv_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
403
+int sysv_getattr(struct path *path, struct kstat *stat)
405
- struct super_block *s = mnt->mnt_sb;
406
- generic_fillattr(dentry->d_inode, stat);
407
+ struct super_block *s = path->mnt->mnt_sb;
408
+ generic_fillattr(path->dentry->d_inode, stat);
409
stat->blocks = (s->s_blocksize / 512) * sysv_nblocks(s, stat->size);
410
stat->blksize = s->s_blocksize;
412
Index: linux-2.6/fs/sysv/sysv.h
413
===================================================================
414
--- linux-2.6.orig/fs/sysv/sysv.h
415
+++ linux-2.6/fs/sysv/sysv.h
416
@@ -142,7 +142,7 @@ extern int sysv_write_inode(struct inode
417
extern int sysv_sync_inode(struct inode *);
418
extern int sysv_sync_file(struct file *, struct dentry *, int);
419
extern void sysv_set_inode(struct inode *, dev_t);
420
-extern int sysv_getattr(struct vfsmount *, struct dentry *, struct kstat *);
421
+extern int sysv_getattr(struct path *, struct kstat *);
422
extern int sysv_init_icache(void);
423
extern void sysv_destroy_icache(void);
425
Index: linux-2.6/fs/xfs/linux-2.6/xfs_iops.c
426
===================================================================
427
--- linux-2.6.orig/fs/xfs/linux-2.6/xfs_iops.c
428
+++ linux-2.6/fs/xfs/linux-2.6/xfs_iops.c
429
@@ -617,11 +617,10 @@ xfs_vn_permission(
433
- struct vfsmount *mnt,
434
- struct dentry *dentry,
438
- struct inode *inode = dentry->d_inode;
439
+ struct inode *inode = path->dentry->d_inode;
440
bhv_vnode_t *vp = vn_from_inode(inode);
441
bhv_vattr_t vattr = { .va_mask = XFS_AT_STAT };
443
Index: linux-2.6/include/linux/coda_linux.h
444
===================================================================
445
--- linux-2.6.orig/include/linux/coda_linux.h
446
+++ linux-2.6/include/linux/coda_linux.h
447
@@ -40,7 +40,7 @@ int coda_flush(struct file *f, fl_owner_
448
int coda_release(struct inode *i, struct file *f);
449
int coda_permission(struct inode *inode, int mask, struct nameidata *nd);
450
int coda_revalidate_inode(struct dentry *);
451
-int coda_getattr(struct vfsmount *, struct dentry *, struct kstat *);
452
+int coda_getattr(struct path *, struct kstat *);
453
int coda_setattr(struct dentry *, struct iattr *);
455
/* global variables */
456
Index: linux-2.6/include/linux/fs.h
457
===================================================================
458
--- linux-2.6.orig/include/linux/fs.h
459
+++ linux-2.6/include/linux/fs.h
460
@@ -1118,7 +1118,7 @@ struct inode_operations {
461
void (*truncate) (struct inode *);
462
int (*permission) (struct inode *, int, struct nameidata *);
463
int (*setattr) (struct dentry *, struct iattr *);
464
- int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
465
+ int (*getattr) (struct path *path, struct kstat *);
466
int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
467
ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
468
ssize_t (*listxattr) (struct dentry *, char *, size_t);
469
@@ -1850,7 +1850,7 @@ extern int dcache_dir_open(struct inode
470
extern int dcache_dir_close(struct inode *, struct file *);
471
extern loff_t dcache_dir_lseek(struct file *, loff_t, int);
472
extern int dcache_readdir(struct file *, void *, filldir_t);
473
-extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *);
474
+extern int simple_getattr(struct path *, struct kstat *);
475
extern int simple_statfs(struct dentry *, struct kstatfs *);
476
extern int simple_link(struct dentry *, struct inode *, struct dentry *);
477
extern int simple_unlink(struct inode *, struct dentry *);
478
Index: linux-2.6/include/linux/msdos_fs.h
479
===================================================================
480
--- linux-2.6.orig/include/linux/msdos_fs.h
481
+++ linux-2.6/include/linux/msdos_fs.h
482
@@ -402,8 +402,7 @@ extern const struct file_operations fat_
483
extern struct inode_operations fat_file_inode_operations;
484
extern int fat_notify_change(struct dentry * dentry, struct iattr * attr);
485
extern void fat_truncate(struct inode *inode);
486
-extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry,
487
- struct kstat *stat);
488
+extern int fat_getattr(struct path *path, struct kstat *stat);
491
extern void fat_attach(struct inode *inode, loff_t i_pos);
492
Index: linux-2.6/include/linux/nfs_fs.h
493
===================================================================
494
--- linux-2.6.orig/include/linux/nfs_fs.h
495
+++ linux-2.6/include/linux/nfs_fs.h
496
@@ -297,7 +297,7 @@ extern struct inode *nfs_fhget(struct su
498
extern int nfs_refresh_inode(struct inode *, struct nfs_fattr *);
499
extern int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr);
500
-extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
501
+extern int nfs_getattr(struct path *, struct kstat *);
502
extern int nfs_permission(struct inode *, int, struct nameidata *);
503
extern int nfs_access_get_cached(struct inode *, struct rpc_cred *, struct nfs_access_entry *);
504
extern void nfs_access_add_cache(struct inode *, struct nfs_access_entry *);