diff options
Diffstat (limited to 'fs/nfs/dir.c')
| -rw-r--r-- | fs/nfs/dir.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index e4a04d16b8b0..dd02db43cbe6 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
| @@ -407,7 +407,7 @@ int nfs_do_filldir(nfs_readdir_descriptor_t *desc, void *dirent, | |||
| 407 | struct file *file = desc->file; | 407 | struct file *file = desc->file; |
| 408 | struct nfs_entry *entry = desc->entry; | 408 | struct nfs_entry *entry = desc->entry; |
| 409 | struct dentry *dentry = NULL; | 409 | struct dentry *dentry = NULL; |
| 410 | unsigned long fileid; | 410 | u64 fileid; |
| 411 | int loop_count = 0, | 411 | int loop_count = 0, |
| 412 | res; | 412 | res; |
| 413 | 413 | ||
| @@ -418,7 +418,7 @@ int nfs_do_filldir(nfs_readdir_descriptor_t *desc, void *dirent, | |||
| 418 | unsigned d_type = DT_UNKNOWN; | 418 | unsigned d_type = DT_UNKNOWN; |
| 419 | /* Note: entry->prev_cookie contains the cookie for | 419 | /* Note: entry->prev_cookie contains the cookie for |
| 420 | * retrieving the current dirent on the server */ | 420 | * retrieving the current dirent on the server */ |
| 421 | fileid = nfs_fileid_to_ino_t(entry->ino); | 421 | fileid = entry->ino; |
| 422 | 422 | ||
| 423 | /* Get a dentry if we have one */ | 423 | /* Get a dentry if we have one */ |
| 424 | if (dentry != NULL) | 424 | if (dentry != NULL) |
| @@ -428,7 +428,7 @@ int nfs_do_filldir(nfs_readdir_descriptor_t *desc, void *dirent, | |||
| 428 | /* Use readdirplus info */ | 428 | /* Use readdirplus info */ |
| 429 | if (dentry != NULL && dentry->d_inode != NULL) { | 429 | if (dentry != NULL && dentry->d_inode != NULL) { |
| 430 | d_type = dt_type(dentry->d_inode); | 430 | d_type = dt_type(dentry->d_inode); |
| 431 | fileid = dentry->d_inode->i_ino; | 431 | fileid = NFS_FILEID(dentry->d_inode); |
| 432 | } | 432 | } |
| 433 | 433 | ||
| 434 | res = filldir(dirent, entry->name, entry->len, | 434 | res = filldir(dirent, entry->name, entry->len, |
| @@ -1350,9 +1350,9 @@ static int nfs_rmdir(struct inode *dir, struct dentry *dentry) | |||
| 1350 | static int nfs_sillyrename(struct inode *dir, struct dentry *dentry) | 1350 | static int nfs_sillyrename(struct inode *dir, struct dentry *dentry) |
| 1351 | { | 1351 | { |
| 1352 | static unsigned int sillycounter; | 1352 | static unsigned int sillycounter; |
| 1353 | const int i_inosize = sizeof(dir->i_ino)*2; | 1353 | const int fileidsize = sizeof(NFS_FILEID(dentry->d_inode))*2; |
| 1354 | const int countersize = sizeof(sillycounter)*2; | 1354 | const int countersize = sizeof(sillycounter)*2; |
| 1355 | const int slen = sizeof(".nfs") + i_inosize + countersize - 1; | 1355 | const int slen = sizeof(".nfs")+fileidsize+countersize-1; |
| 1356 | char silly[slen+1]; | 1356 | char silly[slen+1]; |
| 1357 | struct qstr qsilly; | 1357 | struct qstr qsilly; |
| 1358 | struct dentry *sdentry; | 1358 | struct dentry *sdentry; |
| @@ -1370,8 +1370,9 @@ static int nfs_sillyrename(struct inode *dir, struct dentry *dentry) | |||
| 1370 | if (dentry->d_flags & DCACHE_NFSFS_RENAMED) | 1370 | if (dentry->d_flags & DCACHE_NFSFS_RENAMED) |
| 1371 | goto out; | 1371 | goto out; |
| 1372 | 1372 | ||
| 1373 | sprintf(silly, ".nfs%*.*lx", | 1373 | sprintf(silly, ".nfs%*.*Lx", |
| 1374 | i_inosize, i_inosize, dentry->d_inode->i_ino); | 1374 | fileidsize, fileidsize, |
| 1375 | (unsigned long long)NFS_FILEID(dentry->d_inode)); | ||
| 1375 | 1376 | ||
| 1376 | /* Return delegation in anticipation of the rename */ | 1377 | /* Return delegation in anticipation of the rename */ |
| 1377 | nfs_inode_return_delegation(dentry->d_inode); | 1378 | nfs_inode_return_delegation(dentry->d_inode); |
