locks: fix locks_mandatory_locked to respect file-private locks
[deliverable/linux.git] / fs / namei.c
index d580df2e6804d0863d555234388a34397387c3e6..dc51bac037c9a0f3338729a26663e48e9fdb8ce7 100644 (file)
@@ -2542,7 +2542,7 @@ static int handle_truncate(struct file *filp)
        /*
         * Refuse to truncate files with mandatory locks held on them.
         */
-       error = locks_verify_locked(inode);
+       error = locks_verify_locked(filp);
        if (!error)
                error = security_path_truncate(path);
        if (!error) {
This page took 0.025188 seconds and 5 git commands to generate.