linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / fs / cifs / fcntl.c
index d91a3d4..a7a47bb 100644 (file)
@@ -86,19 +86,21 @@ int cifs_dir_notify(struct file * file, unsigned long arg)
        cifs_sb = CIFS_SB(file->f_dentry->d_sb);
        pTcon = cifs_sb->tcon;
 
+       down(&file->f_dentry->d_sb->s_vfs_rename_sem);
        full_path = build_path_from_dentry(file->f_dentry);
+       up(&file->f_dentry->d_sb->s_vfs_rename_sem);
 
        if(full_path == NULL) {
                rc = -ENOMEM;
        } else {
-               cFYI(1,("dir notify on file %s Arg 0x%lx",full_path,arg));
+               cERROR(1,("cifs dir notify on file %s with arg 0x%lx",full_path,arg)); /* BB removeme BB */
                rc = CIFSSMBOpen(xid, pTcon, full_path, FILE_OPEN, 
                        GENERIC_READ | SYNCHRONIZE, 0 /* create options */,
                        &netfid, &oplock,NULL, cifs_sb->local_nls,
                        cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
                /* BB fixme - add this handle to a notify handle list */
                if(rc) {
-                       cFYI(1,("Could not open directory for notify"));
+                       cERROR(1,("Could not open directory for notify"));  /* BB remove BB */
                } else {
                        filter = convert_to_cifs_notify_flags(arg);
                        if(filter != 0) {