diff options
author | Steve French <sfrench@us.ibm.com> | 2009-01-13 17:03:55 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2009-01-28 22:32:12 -0500 |
commit | 42c245447c8c3f998dfe880aba18b6e5129d2976 (patch) | |
tree | 430af06da69c1d518d9e6af0d577742ec27ed63d /fs/cifs/inode.c | |
parent | 6a7f8d36c00ab7adef5fb633f7805c91e8c1e139 (diff) |
[CIFS] revalidate parent inode when rmdir done within that directory
When a search is pending of a parent directory, and a child directory
within it is removed, we need to reset the parent directory's time
so that we don't reuse the (now stale) search results.
Thanks to Gunter Kukkukk for reporting this:
> got the following failure notification on irc #samba:
>
> A user was updating from subversion 1.4 to 1.5, where the
> repository is located on a samba share (independent of
> unix extensions = Yes or No).
> svn 1.4 did work, 1.5 does not.
>
> The user did a lot of stracing of subversion - and wrote a
> testapplet to simulate the failing behaviour.
> I've converted the C++ source to C and added some error cases.
>
> When using "./testdir" on a local file system, "result2"
> is always (nil) as expected - cifs vfs behaves different here!
>
> ./testdir /mnt/cifs/mounted/share
>
> returns a (failing) valid pointer.
Acked-by: Dave Kleikamp <shaggy@us.ibm.com>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 5ab9896fdcb2..bcf7b5184664 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -1285,6 +1285,11 @@ int cifs_rmdir(struct inode *inode, struct dentry *direntry) | |||
1285 | cifsInode = CIFS_I(direntry->d_inode); | 1285 | cifsInode = CIFS_I(direntry->d_inode); |
1286 | cifsInode->time = 0; /* force revalidate to go get info when | 1286 | cifsInode->time = 0; /* force revalidate to go get info when |
1287 | needed */ | 1287 | needed */ |
1288 | |||
1289 | cifsInode = CIFS_I(inode); | ||
1290 | cifsInode->time = 0; /* force revalidate to get parent dir info | ||
1291 | since cached search results now invalid */ | ||
1292 | |||
1288 | direntry->d_inode->i_ctime = inode->i_ctime = inode->i_mtime = | 1293 | direntry->d_inode->i_ctime = inode->i_ctime = inode->i_mtime = |
1289 | current_fs_time(inode->i_sb); | 1294 | current_fs_time(inode->i_sb); |
1290 | 1295 | ||