X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=fs%2Fubifs%2Fdir.c;h=348dcb2d2e8f9218210890e7488cd4ca71af1ccb;hp=ca4eb9427bdc960df2e4a1db733727a39bedb562;hb=ed21d9ee0cb64c6cbb7f376bd9e90123e4947332;hpb=56d95c049be3063654f8d184e069edce371728f4 diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index ca4eb9427bdc..348dcb2d2e8f 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c @@ -477,6 +477,14 @@ static int ubifs_readdir(struct file *file, void *dirent, filldir_t filldir) out: if (err != -ENOENT) ubifs_err("cannot find next direntry, error %d", err); + else + /* + * -ENOENT is a non-fatal error in this context, the TNC uses + * it to indicate that the cursor moved past the current directory + * and readdir() has to stop. + */ + err = 0; + kfree(file->private_data); file->private_data = NULL;