]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/cifs/inode.c
enable fallocate punch hole ("fallocate -p") for SMB3
[karo-tx-linux.git] / fs / cifs / inode.c
index a174605f6afa56cb73a99335cc966f745a9ded6b..753e7a3486de41fa6b55f758389a9550992d5399 100644 (file)
@@ -1717,6 +1717,12 @@ unlink_target:
                                    target_dentry, to_name);
        }
 
+       /* force revalidate to go get info when needed */
+       CIFS_I(source_dir)->time = CIFS_I(target_dir)->time = 0;
+
+       source_dir->i_ctime = source_dir->i_mtime = target_dir->i_ctime =
+               target_dir->i_mtime = current_fs_time(source_dir->i_sb);
+
 cifs_rename_exit:
        kfree(info_buf_source);
        kfree(from_name);
@@ -1780,7 +1786,7 @@ cifs_invalidate_mapping(struct inode *inode)
  * @word: long word containing the bit lock
  */
 static int
-cifs_wait_bit_killable(void *word)
+cifs_wait_bit_killable(struct wait_bit_key *key)
 {
        if (fatal_signal_pending(current))
                return -ERESTARTSYS;
@@ -1794,8 +1800,8 @@ cifs_revalidate_mapping(struct inode *inode)
        int rc;
        unsigned long *flags = &CIFS_I(inode)->flags;
 
-       rc = wait_on_bit_lock(flags, CIFS_INO_LOCK, cifs_wait_bit_killable,
-                               TASK_KILLABLE);
+       rc = wait_on_bit_lock_action(flags, CIFS_INO_LOCK, cifs_wait_bit_killable,
+                                    TASK_KILLABLE);
        if (rc)
                return rc;