Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
[pandora-kernel.git] / fs / namei.c
index 96ca11d..c83145a 100644 (file)
@@ -2814,7 +2814,7 @@ no_open:
                        } else if (!dentry->d_inode) {
                                goto out;
                        } else if ((open_flag & O_TRUNC) &&
-                                  S_ISREG(dentry->d_inode->i_mode)) {
+                                  d_is_reg(dentry)) {
                                goto out;
                        }
                        /* will fail later, go on to get the right error */