import PULS_20160108
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / fat / dir.c
index 7a6f02caf286d4fa20990b259dd5e4773eeff96e..4b775e606fc8f3ee44157e8a0b5dec4be7141bb4 100644 (file)
@@ -776,6 +776,13 @@ static int fat_ioctl_readdir(struct inode *inode, struct file *filp,
        return ret;
 }
 
+static int fat_ioctl_volume_id(struct inode *dir)
+{
+       struct super_block *sb = dir->i_sb;
+       struct msdos_sb_info *sbi = MSDOS_SB(sb);
+       return sbi->vol_id;
+}
+
 static long fat_dir_ioctl(struct file *filp, unsigned int cmd,
                          unsigned long arg)
 {
@@ -792,6 +799,8 @@ static long fat_dir_ioctl(struct file *filp, unsigned int cmd,
                short_only = 0;
                both = 1;
                break;
+       case VFAT_IOCTL_GET_VOLUME_ID:
+               return fat_ioctl_volume_id(inode);
        default:
                return fat_generic_ioctl(filp, cmd, arg);
        }
@@ -832,6 +841,8 @@ static long fat_compat_dir_ioctl(struct file *filp, unsigned cmd,
                short_only = 0;
                both = 1;
                break;
+       case VFAT_IOCTL_GET_VOLUME_ID:
+               return fat_ioctl_volume_id(inode);
        default:
                return fat_generic_ioctl(filp, cmd, (unsigned long)arg);
        }