Merge branch 'spi' of git://git.linutronix.de/users/bigeasy/soda into spi/next
[cascardo/linux.git] / fs / nfs / internal.h
index db08ff3..e6356b7 100644 (file)
@@ -361,6 +361,15 @@ unsigned int nfs_page_length(struct page *page)
        return 0;
 }
 
+/*
+ * Convert a umode to a dirent->d_type
+ */
+static inline
+unsigned char nfs_umode_to_dtype(umode_t mode)
+{
+       return (mode >> 12) & 15;
+}
+
 /*
  * Determine the number of pages in an array of length 'len' and
  * with a base offset of 'base'